data-interval
data-interval copied to clipboard
lookup value and the/a piece-wise constant component around it
I am sampling sections of a piece-wise constant function encoded as an IntervalMap, and for efficiency reasons it would be useful to have a lookup function that also reported the maximal (or just some non-trivial) interval around the query point on which the IntervalMap is constant. There is a quickly cooked up prototype here: https://github.com/tilowiklundSensmetry/data-interval/pull/1/commits/8e0d144a1c1eb76122a902a443100e8b9d84845e that I am guessing would give a (not necessarily maximal) such interval, but I am not certain enough about the semantics of IntervalMap to say whether it is correct.