Expand description
An implementation of ArrayHash
ArrayHash is a data structure where the index is determined by hash and
each entry in array is a Vec
that store data and all it collision.
Oritinal paper can be found [here](Askitis, N. & Zobel, J. (2005), Cache-conscious collision resolution for string hash tables, in ‘Proc. SPIRE String Processing and Information Retrieval Symp.’, Springer-Verlag, pp. 92–104)
This implementation try to use generic wherever possible.
It end up with ArrayHash that take anything that is clonable as value and anything that
implement Hash
and PartialEq
as key.
It let you choose whichever Hasher
that you want. The only constraint is that
Hasher
must implement Clone
trait.
It supports read only iteration, mutably iteration, and owned iteration.
To create ArrayHash use ArrayHashBuilder.
The default Hasher
is XxHasher64
.
Structs§
- Array
Hash - An implementation of ArrayHash in pure Rust.
- Array
Hash Builder - A builder that use for build an ArrayHash.
- Array
Hash Into Iter - Array
Hash Iter Mut - An iterator that return a mutably reference to each entry in
ArrayHash
. It is useful for scanning entireArrayHash
to manipulate it value. - Array
Hash Iterator - An iterator that return a reference to each entry in
ArrayHash
. It is useful for scanning entireArrayHash
. - Drain
Iter - An iterator that will drain it underlying ArrayHash.
- Drain
With Iter - An iterator that remove and return element that satisfy predicate. It will also update the size of borrowed ArrayHash on each iteration.