Haskell Range Map library?

This task is called a stabbing query on a set of intervals. An efficient data structure for it is called (one-dimensional) segment tree The SegmentTree package provides an implementation of this data structure, but unfortunately I cannot figure out how to use it. (I feel that the interface of this package does not provide the right level of abstraction.).

This task is called a stabbing query on a set of intervals. An efficient data structure for it is called (one-dimensional) segment tree. The SegmentTree package provides an implementation of this data structure, but unfortunately I cannot figure out how to use it.(I feel that the interface of this package does not provide the right level of abstraction.).

Good old Data. Map (and its more efficient Data. IntMap cousin) has a function splitLookup :: Ord k => k -> Map k a -> (Map k a, Maybe a, Map k a) which splits a map into submaps of keys less than / greater than a given key.

This can be used for certain kinds of range searching.

Yes, Data. Map certainly is useful here. I've used this quite successfully for "closest address to" type routing of network messages.

The minView and maxView along with their *WithKeys cousins are also useful. – Thomas M. DuBuisson Oct 8 '10 at 21:48.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions