C implementation of interval tree?

I could find a C ++ one here , but not a pure C one. Any pointers?

+4
source share
2 answers
+4
source

If you restrict data to non-overlapping segments, you can use the functions of the binary tree <search.h> tsearch / tfind , etc., as a result of which you use whole interval tuples as keys. The supplied comparison function could easily put the general order into segments. To find a segment that contains a given point, tfind for a synthetic interval of width 0.

0
source

All Articles