úÎ"= T     non-portable (MPTCs) experimentaldastapov@gmail.com Safe-Inferredportable experimentaldastapov@gmail.com Safe-InferredPAn interval. The lower bound should be less than or equal to the higher bound. Extension of the type v' that includes plus and minus infinity MChecks whether smaller interval is a proper subinterval of a larger interval 2Checks whether two intervals intersect each other ,Checks whether point is inside the interval 1Merge two intervals that share a common boundary      %non-portable (MPTCs, etc - see above) experimentaldastapov@gmail.com Safe-Inferred KSegment Tree is a binary tree that stores Interval in each leaf or branch.  By construction (see  and () intervals in branches should be union 0 of the intervals from left and right subtrees. "Additionally, each node carries a tag of type t (which should be monoid). W By supplying different monoids, segment tree could be made to support different types Y of stabbing queries: Sum or Integer monoid will give tree that counts hits, and list or N Set monoids will give a tree that returns actual intervals containing point.  Build the  SegmentTree8 for the given list of pair of points. Time: O(n*log n) # Segment tree is built as follows: 2 * Supplied list of point pairs define so-called atomic intervals  * They are used to build skeleton binary tree # * Each supplied interval is then inserted& into this tree, updating tag values  in tree branches and leaves Insert interval i6 into segment tree, updating tag values as necessary. 3 Semantics of tags depends on the monoid used (see ) ?Query the segment tree for the specified point. Time: O(log n) Convenience wrapper around *. Returns count of intervals covering the point Convenience wrapper around I to perform stabbing query. Returns list of intevals coverting the point   !"#$     !"#$%       !"#$%&'SegmentTree-0.3Data.SegmentTreeData.SegmentTree.MeasuredData.SegmentTree.IntervalIntervalltypelowhighhtypeBoundaryClosedOpenRPlusInfMinusInfSTreeBranchLeaffromListinsert queryTree countingQuery stabbingQueryMeasuredmeasure subinterval intersectsinsidemerge$fShowInterval $fBoundedR$fShowRleafbranchtaginterval$fMeasuredIntervalSum$fMeasuredInterval[] $fShowSTree