Posted to tcl by jima at Thu Feb 16 20:26:53 GMT 2017view raw

  1. # Dict is organized like:
  2. # TS ts {LOW low HIGH high} ...
  3.  
  4. # Case 0: get the min of the LOW "column"
  5. set x {}
  6. tcl::mathfunc::min {*}[
  7. dict for {k v} $S(iD1) {lappend x [dict get $v low]};set x
  8. ]
  9.  
  10. # Case 1: get the min of the LOW "column" for a range of values.
  11. # Consider left and right point to TS keys.
  12. # I think horrible shimmering happens heah...
  13. set x {}
  14. tcl::mathfunc::min {*}[
  15. dict for {k v} [
  16. lrange $S(iD1) $left $right
  17. ] {lappend x [dict get $v low]};set x
  18. ]
  19.