Add todo for custom weight type for Dijkstra's algorithm

This commit is contained in:
2026-05-18 16:15:46 +02:00
parent ce692cb0b2
commit 3adfb4b9eb
+1
View File
@@ -27,6 +27,7 @@ pub struct DijkstraResult<V: Copy> {
pub predecessors: VertexMap<V, Option<V>>, pub predecessors: VertexMap<V, Option<V>>,
} }
// TODO: Generalize the return type of the weight function.
pub fn dijkstra<G, W>(graph: &G, source: G::Vertex, weight: W) -> DijkstraResult<G::Vertex> pub fn dijkstra<G, W>(graph: &G, source: G::Vertex, weight: W) -> DijkstraResult<G::Vertex>
where where
G: GraphTopology, G: GraphTopology,