Trait traitgraph::algo::dijkstra::NodeWeightArray [−][src]
pub trait NodeWeightArray<WeightType> {
fn new(size: usize) -> Self;
fn get(&self, node_index: usize) -> WeightType;
fn get_mut(&mut self, node_index: usize) -> &mut WeightType;
fn set(&mut self, node_index: usize, weight: WeightType);
fn clear(&mut self);
}
Expand description
An array to store minimal node weights for Dijkstra’s algorithm.
Required methods
Returns the current weight of the given node index.
Returns the current weight of the given node index as mutable reference.
Sets the current weight of the given node index.