diff --git a/src/graph.rs b/src/graph.rs index 606135a..62c67d1 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -290,6 +290,10 @@ where None } + /// find a path between two nodes using dijkstras algorithm. + /// + /// this take into account edge weights and finds a path with + /// the least total weight. pub fn find_path_dijkstra(&self, from: &V, to: &V) -> Option> { use std::cmp::Reverse as Rev; use std::collections::BinaryHeap;