Type Definition rustworkx_core::dictmap::DictMap

source ·
pub type DictMap<K, V> = IndexMap<K, V, RandomState>;
Expand description

Convenient alias to build an IndexMap using a custom hasher. For the moment, we use ahash which is the default hasher for HashMap, another hashmap we use.

Trait Implementations§

source§

impl<K: Eq + Hash, V: Clone> DistanceMap<K, V> for DictMap<K, V>

source§

fn build(_num_elements: usize) -> Self

Create mapping with support for items between 0 and num_elements - 1.
source§

fn get_item(&self, pos: K) -> Option<&V>

Get the distance to the item at pos. If the distance does not exist, the function returns None.
source§

fn put_item(&mut self, pos: K, val: V)

Insert item at position pos with distance V.
source§

impl<K, V> InitWithHasher for DictMap<K, V>

source§

fn new() -> Self

source§

fn with_capacity(n: usize) -> Self