Struct boomphf_patched::hashmap::NoKeyBoomHashMap2
source · pub struct NoKeyBoomHashMap2<K, D1, D2> {
pub mphf: Mphf<K>,
pub values: Vec<D1>,
pub aux_values: Vec<D2>,
}Expand description
A HashMap data structure where the mapping between keys and values is encoded in a Mphf. Keys are not stored - this can greatly improve the memory consumption, but can only be used if you can guarantee that you will only query for keys that were in the original set. Querying for a new key will return a random value, silently.
Fields§
§mphf: Mphf<K>§values: Vec<D1>§aux_values: Vec<D2>Implementations§
source§impl<K, D1, D2> NoKeyBoomHashMap2<K, D1, D2>where
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
impl<K, D1, D2> NoKeyBoomHashMap2<K, D1, D2>where
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
pub fn new_parallel(
keys: Vec<K>,
values: Vec<D1>,
aux_values: Vec<D2>
) -> NoKeyBoomHashMap2<K, D1, D2>
pub fn new_with_mphf(
mphf: Mphf<K>,
values: Vec<D1>,
aux_values: Vec<D2>
) -> NoKeyBoomHashMap2<K, D1, D2>
Trait Implementations§
source§impl<K: Clone, D1: Clone, D2: Clone> Clone for NoKeyBoomHashMap2<K, D1, D2>
impl<K: Clone, D1: Clone, D2: Clone> Clone for NoKeyBoomHashMap2<K, D1, D2>
source§fn clone(&self) -> NoKeyBoomHashMap2<K, D1, D2>
fn clone(&self) -> NoKeyBoomHashMap2<K, D1, D2>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<K, D1, D2> FromIterator<(K, D1, D2)> for NoKeyBoomHashMap2<K, D1, D2>where
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
impl<K, D1, D2> FromIterator<(K, D1, D2)> for NoKeyBoomHashMap2<K, D1, D2>where
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
source§fn from_iter<I: IntoIterator<Item = (K, D1, D2)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (K, D1, D2)>>(iter: I) -> Self
Creates a value from an iterator. Read more