Segment List Recipe¶
-
class
sortedcollections.
SegmentList
(iterable=())¶ List that supports fast random insertion and deletion of elements.
SegmentList is a special case of a SortedList initialized with a key function that always returns 0. As such, several SortedList methods are not implemented for SegmentList.
-
__init__
(iterable=())¶ SortedListWithKey provides most of the same methods as list but keeps the items in sorted order.
An optional iterable provides an initial series of items to populate the SortedListWithKey.
An optional key argument defines a callable that, like the key argument to Python’s sorted function, extracts a comparison key from each element. The default is the identity function.
-
add
(*args, **kwargs)¶ Not implemented.
-
bisect
(*args, **kwargs)¶ Not implemented.
-
bisect_key
(*args, **kwargs)¶ Not implemented.
-
bisect_key_left
(*args, **kwargs)¶ Not implemented.
-
bisect_key_right
(*args, **kwargs)¶ Not implemented.
-
bisect_left
(*args, **kwargs)¶ Not implemented.
-
bisect_right
(*args, **kwargs)¶ Not implemented.
-
irange
(*args, **kwargs)¶ Not implemented.
-
sort
(key=None, reverse=False)¶ Stable sort in place.
-
update
(*args, **kwargs)¶ Not implemented.
-
static
zero
(_)¶ Return 0.
-