From 035528ed8c73d1250d19db8000f8bf8ce916be01 Mon Sep 17 00:00:00 2001 From: Kalyan Date: Thu, 16 Jan 2025 13:30:28 +0530 Subject: [PATCH] added reference for Yen algorithm --- rustworkx-core/src/shortest_path/simple_shortest_paths.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rustworkx-core/src/shortest_path/simple_shortest_paths.rs b/rustworkx-core/src/shortest_path/simple_shortest_paths.rs index a58a443d47..e405556150 100644 --- a/rustworkx-core/src/shortest_path/simple_shortest_paths.rs +++ b/rustworkx-core/src/shortest_path/simple_shortest_paths.rs @@ -9,7 +9,7 @@ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations // under the License. -// +// // This Library is for finding out the shortest paths in increasing cost order. use crate::petgraph::algo::Measure; @@ -144,6 +144,8 @@ where } /// Implementation of Yen's Algorithm to find k shortest paths. +/// More on Yen's algorithm - https://people.csail.mit.edu/minilek/yen_kth_shortest.pdf + pub fn get_smallest_k_paths_yen( graph: &mut Graph, start: NodeIndex,