class documentation

class SortedTableMap(MapBase):

View In Hierarchy

Map implementation using a sorted table.

Method __delitem__ Remove item associated with key k (raise KeyError if not found).
Method __getitem__ Return value associated with key k (raise KeyError if not found).
Method __init__ Create an empty map.
Method __iter__ Generate keys of the map ordered from minimum to maximum.
Method __len__ Return number of items in the map.
Method __reversed__ Generate keys of the map ordered from maximum to minimum.
Method __setitem__ Assign value v to key k, overwriting existing value if present.
Method find_ge Return (key,value) pair with least key greater than or equal to k.
Method find_gt Return (key,value) pair with least key strictly greater than k.
Method find_le Return (key,value) pair with greatest key less than or equal to k.
Method find_lt Return (key,value) pair with greatest key strictly less than k.
Method find_max Return (key,value) pair with maximum key (or None if empty).
Method find_min Return (key,value) pair with minimum key (or None if empty).
Method find_range Iterate all (key,value) pairs such that start <= key < stop.
Method _find_index No summary
Instance Variable _table Undocumented

Inherited from MapBase:

Class _Item Lightweight composite to store key-value pairs as map items.
def __delitem__(self, k):

Remove item associated with key k (raise KeyError if not found).

def __getitem__(self, k):

Return value associated with key k (raise KeyError if not found).

def __init__(self):

Create an empty map.

def __iter__(self):

Generate keys of the map ordered from minimum to maximum.

def __len__(self):

Return number of items in the map.

def __reversed__(self):

Generate keys of the map ordered from maximum to minimum.

def __setitem__(self, k, v):

Assign value v to key k, overwriting existing value if present.

def find_ge(self, k):

Return (key,value) pair with least key greater than or equal to k.

Return None if there does not exist such a key.

def find_gt(self, k):

Return (key,value) pair with least key strictly greater than k.

Return None if there does not exist such a key.

def find_le(self, k):

Return (key,value) pair with greatest key less than or equal to k.

Return None if there does not exist such a key.

def find_lt(self, k):

Return (key,value) pair with greatest key strictly less than k.

Return None if there does not exist such a key.

def find_max(self):

Return (key,value) pair with maximum key (or None if empty).

def find_min(self):

Return (key,value) pair with minimum key (or None if empty).

def find_range(self, start, stop):

Iterate all (key,value) pairs such that start <= key < stop.

If start is None, iteration begins with minimum key of map. If stop is None, iteration continues through the maximum key of map.

def _find_index(self, target):
_table: list =

Undocumented