ordered_setmaintains sorted unique elements in ascending order usinglesscomparison. ordered_multisetallows duplicates using aless_equalcomparison, preserving the sorted order. Fucntions In addition to normal set operations, the ordered set supports: order_of_key(k): Gives the count of elements smaller...
Notice, however, that if we have two points in the set(a, b)and(c, d)such thatc ≤ aandd ≤ bthen the latter is redundant (it is always worse) and we can remove it. In this way we keep the set small and only need to check a single element whenever we insert,...