úÎpânon-portable (MPTCs) experimentaldastapov@gmail.com   portable experimentaldastapov@gmail.com PAn 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     %non-portable (MPTCs, etc - see above) experimentaldastapov@gmail.com 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.2Data.SegmentTreeData.SegmentTree.MeasuredData.SegmentTree.IntervalSTreeBranchLeaffromListinsert queryTree countingQuery stabbingQueryMeasuredmeasureIntervalltypelowhighhtypeBoundaryClosedOpenRPlusInfMinusInf subinterval intersectsinsidemergeleafbranchtag