- Companion:
- object
Value members
Abstract methods
Queries the value for a given key.
Queries the value for a given key.
- Value parameters:
- key
the key to look for
- Returns:
the value if it was found at the key, otherwise
None
Inserts a new entry into the map.
Inserts a new entry into the map.
- Value parameters:
- key
the entry's key to insert
- value
the entry's value to insert
- Returns:
the previous value stored at the key, or
None
if the key was not in the map
Inherited methods
Finds the entry with the smallest key which is greater than or equal to the search key.
Finds the entry with the smallest key which is greater than or equal to the search key.
- Value parameters:
- key
the search key
- Returns:
the found entry, or
None
if there is no key greater than or equal to the search key (e.g. the list is empty)- Inherited from:
- SkipList
Searches for the Branch of a given key.
Searches for the Branch of a given key.
- Value parameters:
- key
the key to search for
- Returns:
true
if the key is in the list,false
otherwise- Inherited from:
- SkipList
Finds the entry with the largest key which is smaller than or equal to the search key.
Finds the entry with the largest key which is smaller than or equal to the search key.
- Value parameters:
- key
the search key
- Returns:
the found entry, or
None
if there is no key smaller than or equal to the search key (e.g. the list is empty)- Inherited from:
- SkipList
Returns the first element. Throws an exception if the list is empty.
Returns the first element. Throws an exception if the list is empty.
- Inherited from:
- SkipList
Returns the first element, or None
if the list is empty.
Returns the first element, or None
if the list is empty.
- Inherited from:
- SkipList
The number of levels in the skip list.
The number of levels in the skip list.
- Inherited from:
- SkipList
Finds the nearest item equal or greater than an unknown item from an isomorphic set. The isomorphism is represented by a comparison function which guides the binary search.
Finds the nearest item equal or greater than an unknown item from an isomorphic set. The isomorphism is represented by a comparison function which guides the binary search.
- Value parameters:
- compare
a function that guides the search. should return -1 if the argument is smaller than the search key, 0 if both are equivalent, or 1 if the argument is greater than the search key. E.g., using some mapping, the function could look like
mapping.apply(_).compare(queryKey)
- Returns:
the nearest item, or the maximum item
- Inherited from:
- SkipList
Returns the last element. Throws an exception if the list is empty.
Returns the last element. Throws an exception if the list is empty.
- Inherited from:
- SkipList
Returns the last element, or None
if the list is empty.
Returns the last element, or None
if the list is empty.
- Inherited from:
- SkipList
The maximum gap within elements of each skip level.
The maximum gap within elements of each skip level.
- Inherited from:
- SkipList
The minimum gap within elements of each skip level.
The minimum gap within elements of each skip level.
- Inherited from:
- SkipList
Reports the number of keys in the skip list (size of the bottom level). This operation may take up to O(n) time, depending on the implementation.
Reports the number of keys in the skip list (size of the bottom level). This operation may take up to O(n) time, depending on the implementation.
- Inherited from:
- SkipList