pub fn path_length(graph: &RailwayGraph, edges: &Vec<EdgeId>) -> Option<Length>
Expand description

Calculate the total length of the given sequence of edges in the railway network.

Arguments

  • graph - A reference to the RailwayGraph instance.
  • edges - A Vec<EdgeId> representing the sequence of edges.

Returns

An Option<Length> representing the total length of the given sequence of edges in meters, if all edge IDs are valid.