Map
Value members
Abstract methods
Marks a given key with a given value.
Marks a given key with a given value.
- Value Params
- entry
the key-value pair (where the key is a vertex in the full tree)
- Returns
true
if the mark is new,false
if there had been a mark for the given vertex.
Queries for a mark at a given version vertex. Unlike nearest
, this does
not search in the map, but merely tests if the given vertex has been
marked or not.
Queries for a mark at a given version vertex. Unlike nearest
, this does
not search in the map, but merely tests if the given vertex has been
marked or not.
- Value Params
- vertex
the version vertex to look up
- Returns
the value associated with that vertex, or
None
if the vertex is unmarked.
Finds the nearest marked ancestor of a given version key.
Since the map is constructed with a defined root value, this method is
guaranteed to succeed—if there are no other marks in the map,
it will return the root value (unless the version
argument is
illegal, i.e. has a version lower than the root vertex' version).
Finds the nearest marked ancestor of a given version key.
Since the map is constructed with a defined root value, this method is
guaranteed to succeed—if there are no other marks in the map,
it will return the root value (unless the version
argument is
illegal, i.e. has a version lower than the root vertex' version).
- Value Params
- vertex
the key to look for. The algorithm searches for the nearest ancestor in the marked map with a version less than or equal to the given version
- Returns
a pair consisting of the tree vertex found and the value with which it has been marked. If the query
version
vertex was marked, it will be that vertex which is returned, and not an ancestor.
Searches for the nearest marked ancestor, where version control is handed over
to a custom predicate function. I.e., while nearestOption
will test for a
version that is less than or equal to the query version, the behaviour may be
customised here. The predicate function is called with the versionInt
field
of the vertices, e.g. using the tree's intView
.
Searches for the nearest marked ancestor, where version control is handed over
to a custom predicate function. I.e., while nearestOption
will test for a
version that is less than or equal to the query version, the behaviour may be
customised here. The predicate function is called with the versionInt
field
of the vertices, e.g. using the tree's intView
.
Only those vertices are considered for which the predicate is true
.
'''Note:''' This currently only works correctly if the predicate tests for version anteriority!
- Value Params
- p
the predicate function for the integer view of the vertex versions
- vertex
the query vertex