Rename find_path* algorithms to dfs_find_path*

This commit is contained in:
2026-07-03 21:43:55 +02:00
parent 4f08eb453f
commit 6a0c426c77
2 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -261,14 +261,14 @@ where
(visited, None)
}
pub fn find_path<G>(graph: &G, source: G::Vertex, target: G::Vertex) -> Option<Vec<G::Edge>>
pub fn dfs_find_path<G>(graph: &G, source: G::Vertex, target: G::Vertex) -> Option<Vec<G::Edge>>
where
G: GraphTopology,
{
find_path_where(graph, source, |v| v == target)
dfs_find_path_where(graph, source, |v| v == target)
}
pub fn find_path_where<G, P>(graph: &G, source: G::Vertex, predicate: P) -> Option<Vec<G::Edge>>
pub fn dfs_find_path_where<G, P>(graph: &G, source: G::Vertex, predicate: P) -> Option<Vec<G::Edge>>
where
G: GraphTopology,
P: Fn(G::Vertex) -> bool,