Struct boomphf::Mphf [] [src]

pub struct Mphf<T: Hash + Clone + Debug> { /* fields omitted */ }

A minimal perfect hash function over a set of objects of type T.

Methods

impl<T: Hash + Clone + Debug> Mphf<T>
[src]

[src]

Generate a minimal perfect hash function for the set of objects. objects must not contain any duplicate items. gamma controls the tradeoff between the construction-time and run-time speed, and the size of the datastructure representing the hash function. See the paper for details. max_iters - None to never stop trying to find a perfect hash (safe if no duplicates).

[src]

Compute the hash value of item. This method should only be used with items known to be in construction set. Use try_hash if you cannot guarantee that item was in the construction set. If item was not present in the construction set this function may panic.

[src]

Compute the hash value of item. If item was not present in the set of objects used to construct the hash function, the return value will an arbitrary value Some(x), or None.

Trait Implementations

impl<T: Hash + Clone + Debug> HeapSizeOf for Mphf<T>
[src]

[src]

Measure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more