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);
    fn size(&mut self) -> usize;
}
Expand description

A min-heap used in Dijkstra’s shortest path algorithm.

Required Methods

Insert an index-weight pair into the heap.

Remove the weight and index with the smallest weight from the heap.

Remove all entries from the heap.

Returns the number of nodes the heap currently has space for.

Implementations on Foreign Types

Implementors