Trait transit_grid::core::PathCoordinates
source · pub trait PathCoordinates<T: CoordNum> {
// Required methods
fn source_coordinate(&self) -> Coord<T>;
fn target_coordinate(&self) -> Coord<T>;
}
Expand description
Trait providing a way to get the coordinates of the source and target nodes of a path.
PathCoordinates
can be implemented by any type that has a source and target coordinate.
This is useful in graph algorithms where you need to know the start and end point of an edge.
Required Methods§
sourcefn source_coordinate(&self) -> Coord<T>
fn source_coordinate(&self) -> Coord<T>
Returns the source coordinate of the path.
sourcefn target_coordinate(&self) -> Coord<T>
fn target_coordinate(&self) -> Coord<T>
Returns the target coordinate of the path.