Trait traitgraph_algo::dijkstra::NodeWeightArray
source · [−]pub trait NodeWeightArray<WeightType> {
fn new(size: usize) -> Self;
fn get(&self, node_index: usize) -> WeightType;
fn get_mut<'this: 'result, 'result>(
&'this mut self,
node_index: usize
) -> &'result 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.
fn get_mut<'this: 'result, 'result>(
&'this mut self,
node_index: usize
) -> &'result mut WeightType
fn get_mut<'this: 'result, 'result>(
&'this mut self,
node_index: usize
) -> &'result mut WeightType
Returns the current weight of the given node index as mutable reference.
Sets the current weight of the given node index.