Crate ahtable

Source
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§

ArrayHash
An implementation of ArrayHash in pure Rust.
ArrayHashBuilder
A builder that use for build an ArrayHash.
ArrayHashIntoIter
ArrayHashIterMut
An iterator that return a mutably reference to each entry in ArrayHash. It is useful for scanning entire ArrayHash to manipulate it value.
ArrayHashIterator
An iterator that return a reference to each entry in ArrayHash. It is useful for scanning entire ArrayHash.
DrainIter
An iterator that will drain it underlying ArrayHash.
DrainWithIter
An iterator that remove and return element that satisfy predicate. It will also update the size of borrowed ArrayHash on each iteration.