Trait traitgraph_algo::dijkstra::DijkstraHeap
source · [−]pub trait DijkstraHeap<WeightType, IndexType>: Default {
fn insert(&mut self, weight: WeightType, index: IndexType);
fn remove_min(&mut self) -> Option<(WeightType, IndexType)>;
fn clear(&mut self);
}
Expand description
A min-heap used in Dijkstra’s shortest path algorithm.
Required Methods
Insert an index-weight pair into the heap.
fn remove_min(&mut self) -> Option<(WeightType, IndexType)>
fn remove_min(&mut self) -> Option<(WeightType, IndexType)>
Remove the weight and index with the smallest weight from the heap.