class

Fqix::Mphf

Inherits Reference < Object

Pure-Crystal BBHash-style minimal perfect hash over distinct UInt64 keys. Non-member lookup is total: it returns nil when absence is provable, or an arbitrary in-range slot when the non-member lands on a placed bit.

Constants

GAMMA = 2.0
MAX_LEVEL = 25
RANK_STEP = 512

Constructors

empty(seed : UInt64) : Mphf
Source
new(keys : Array(UInt64), seed : UInt64)
Source
read(io : IO, bytesize : UInt64, seed : UInt64) : Mphf
Source

Class methods

mix(value : UInt64) : UInt64
Source

Instance methods

key_count
Source
lookup(key : UInt64) : UInt64 | Nil
Source
size
Source
to_slice
Source
write(io : IO) : Nil
Source