Module ph::fmph::keyset

source ·
Expand description

Managing sets of keys during construction of minimal perfect hash functions.

Structs§

  • Implementation of KeySet that stores only the object that returns iterator over all keys (the iterator can even expose the keys that have been removed earlier by retain methods). It is usually a good idea to use it within CachedKeySet, see CachedKeySet::dynamic.
  • Implements KeySet that use immutable slice.
  • Implements KeySet, storing keys in the mutable slice.
  • KeySet implementation that stores reference to slice with keys, and indices of this slice that points retained keys. Indices are stored partitioned to segments and stored as 8 (if I=u8) or 16-bit (if I=u16) integers. Each segment covers $2^8$ or $2^{16}$ consecutive keys. Empty segments are not stored.

Enums§

  • Implementation of KeySet that initially stores another KeySet (which is usually succinct but slow, such as DynamicKeySet), but when number of keys drops below given threshold, the remaining keys are cached (cloned into the vector), and later only the cache is used.

Traits§