Skip to main content

Module utils

Module utils 

Source
Expand description

Utility functions.

Functions§

map32_to_32
Maps 32-bit hash to the range [0, n), where n is a 32-bit integer.
map64_to_64
Maps 64-bit hash to the range [0, n), where n is a 64-bit integer.
read_bits
Reads number_of_bits bits, rounded up to multiple of 64, from input.
verify_kphf
Checks if kphf is valid partial k-perfect hash function. Panics if it is not (also if phf returns None for any key).
verify_partial_kphf
Checks if kphf is valid partial (None results are ignored) k-perfect hash function. Panics if it is not.
verify_partial_phf
Checks if phf is valid partial (None results are ignored) perfect hash function. Panics if it is not.
verify_phf
Checks if phf is valid k-perfect hash function. Panics if it is not (also if phf returns None for any key).

Type Aliases§

ArrayWithRank