Expand description

This module implements the UniMap, which is a way to get efficient mappings optimized for the setting of tree_borrows/tree.rs.

A UniKeyMap<K> is a (slow) mapping from K to UniIndex, and UniValMap<V> is a (fast) mapping from UniIndex to V. Thus a pair (UniKeyMap<K>, UniValMap<V>) acts as a virtual HashMap<K, V>.

Because of the asymmetry in access time, the use-case for UniMap is the following: a tuple (UniKeyMap<K>, Vec<UniValMap<V>>) is much more efficient than the equivalent Vec<HashMap<K, V>> it represents if all maps have similar sets of keys.

Modules

Structs