pub trait DistanceMap<K, V> {
    fn build(num_elements: usize) -> Self;
    fn get_item(&self, pos: K) -> Option<&V>;
    fn put_item(&mut self, pos: K, val: V);
}
Expand description

A mapping for storing the distances of nodes for shortest path algorithms.

Required Methods

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

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

Insert item at position pos with distance V.

Implementations on Foreign Types

Implementors