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
Sourcenew(keys : Array(UInt64), seed : UInt64)
Sourceread(io : IO, bytesize : UInt64, seed : UInt64) : Mphf
SourceClass methods
mix(value : UInt64) : UInt64
SourceInstance methods
key_count
Sourcelookup(key : UInt64) : UInt64 | Nil
Sourcesize
Sourceto_slice
Sourcewrite(io : IO) : Nil
Source