[−][src]Struct boomphf::hashmap::BoomHashMap2
A HashMap data structure where the mapping between keys and 2 values is encoded in a Mphf. You should usually use BoomHashMap
with a tuple/struct value type.
If the layout overhead of the struct / tuple must be avoided, this variant of is an alternative.
This lets us store the keys and values in dense
arrays, with ~3 bits/item overhead in the Mphf.
Implementations
impl<K, D1, D2> BoomHashMap2<K, D1, D2> where
K: Hash + Debug + PartialEq,
D1: Debug,
D2: Debug,
[src]
K: Hash + Debug + PartialEq,
D1: Debug,
D2: Debug,
pub fn new(
keys: Vec<K>,
values: Vec<D1>,
aux_values: Vec<D2>
) -> BoomHashMap2<K, D1, D2>
[src]
keys: Vec<K>,
values: Vec<D1>,
aux_values: Vec<D2>
) -> BoomHashMap2<K, D1, D2>
Create a new hash map from the parallel arrays keys
and values
, and aux_values
pub fn get<Q: ?Sized>(&self, kmer: &Q) -> Option<(&D1, &D2)> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get_key_id<Q: ?Sized>(&self, kmer: &Q) -> Option<usize> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
K: Borrow<Q>,
Q: Hash + Eq,
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn iter(&self) -> Boom2Iterator<'_, K, D1, D2>ⓘNotable traits for Boom2Iterator<'a, K, D1, D2>
impl<'a, K: Hash, D1, D2> Iterator for Boom2Iterator<'a, K, D1, D2> type Item = (&'a K, &'a D1, &'a D2);
[src]
Notable traits for Boom2Iterator<'a, K, D1, D2>
impl<'a, K: Hash, D1, D2> Iterator for Boom2Iterator<'a, K, D1, D2> type Item = (&'a K, &'a D1, &'a D2);
pub fn get_key(&self, id: usize) -> Option<&K>
[src]
impl<K, D1, D2> BoomHashMap2<K, D1, D2> where
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
[src]
K: Hash + Debug + PartialEq + Send + Sync,
D1: Debug,
D2: Debug,
pub fn new_parallel(
keys: Vec<K>,
data: Vec<D1>,
aux_data: Vec<D2>
) -> BoomHashMap2<K, D1, D2>
[src]
keys: Vec<K>,
data: Vec<D1>,
aux_data: Vec<D2>
) -> BoomHashMap2<K, D1, D2>
Create a new hash map from the parallel arrays keys
and values
, and aux_values
, using a parallel algorithm to construct the Mphf.
Trait Implementations
impl<K: Debug + Hash, D1: Debug, D2: Debug> Debug for BoomHashMap2<K, D1, D2>
[src]
impl<'a, K: Hash, D1, D2> IntoIterator for &'a BoomHashMap2<K, D1, D2>
[src]
type Item = (&'a K, &'a D1, &'a D2)
The type of the elements being iterated over.
type IntoIter = Boom2Iterator<'a, K, D1, D2>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> Boom2Iterator<'a, K, D1, D2>ⓘNotable traits for Boom2Iterator<'a, K, D1, D2>
impl<'a, K: Hash, D1, D2> Iterator for Boom2Iterator<'a, K, D1, D2> type Item = (&'a K, &'a D1, &'a D2);
[src]
Notable traits for Boom2Iterator<'a, K, D1, D2>
impl<'a, K: Hash, D1, D2> Iterator for Boom2Iterator<'a, K, D1, D2> type Item = (&'a K, &'a D1, &'a D2);
Auto Trait Implementations
impl<K, D1, D2> RefUnwindSafe for BoomHashMap2<K, D1, D2> where
D1: RefUnwindSafe,
D2: RefUnwindSafe,
K: RefUnwindSafe,
[src]
D1: RefUnwindSafe,
D2: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, D1, D2> Send for BoomHashMap2<K, D1, D2> where
D1: Send,
D2: Send,
K: Send,
[src]
D1: Send,
D2: Send,
K: Send,
impl<K, D1, D2> Sync for BoomHashMap2<K, D1, D2> where
D1: Sync,
D2: Sync,
K: Sync,
[src]
D1: Sync,
D2: Sync,
K: Sync,
impl<K, D1, D2> Unpin for BoomHashMap2<K, D1, D2> where
D1: Unpin,
D2: Unpin,
K: Unpin,
[src]
D1: Unpin,
D2: Unpin,
K: Unpin,
impl<K, D1, D2> UnwindSafe for BoomHashMap2<K, D1, D2> where
D1: UnwindSafe,
D2: UnwindSafe,
K: UnwindSafe,
[src]
D1: UnwindSafe,
D2: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,