Hashing
A utility object implementing the prefix calculation for the randomized hash approach to storing access paths.
Value members
Concrete methods
Iterates over all the hash prefixes of a given path (excluding the full prefix itself). The caller would typically test whether the returned element's sub path is empty or not, and store an appropriate empty or partial tag in its representation.
Iterates over all the hash prefixes of a given path (excluding the full prefix itself). The caller would typically test whether the returned element's sub path is empty or not, and store an appropriate empty or partial tag in its representation.
After the method returns, the
caller will typically add an entry for the full hash (s.sum
), an entry which is not provided by the
iterator itself.
The reason why s.sum
is not automatically added is that the caller might want to store
a special values for this "full" entry.
- Value Params
- contains
a test function whether a given hash is already stored in the caller's representation. only prefixes are provided for hashes which are not already present according to this function
- s
the path for which to calculate the prefixes
- Returns
an iterator over the prefixes.
Searches for the maximum prefix of a path s
that is also
a prefix of this path. Assumes that s
extends this path.
Searches for the maximum prefix of a path s
that is also
a prefix of this path. Assumes that s
extends this path.
- Value Params
- contains
a function to check the hash map built before using
foreachPrefix
- s
the extension of this path
- Returns
the length of the prefix