Skip to main content

EdgeLength

Trait EdgeLength 

Source
pub trait EdgeLength<T: CoordFloat + Sum> {
    // Required methods
    fn length(&self) -> T;
    fn euclidean_length(&self) -> T;
    fn haversine_length(&self) -> T;
}
Expand description

EdgeLength trait provides the length of an element. It is designed to work with types that implement the CoordFloat, FromPrimitive, and Sum traits.

Required Methods§

Source

fn length(&self) -> T

Returns the Euclidean length of the element.

Source

fn euclidean_length(&self) -> T

Returns the Euclidean length of the element.

Source

fn haversine_length(&self) -> T

Returns the Haversine (great-circle) length of the element.

Implementors§

Source§

impl<T: CoordFloat + FromPrimitive + Sum> EdgeLength<T> for TransitEdge<T>

EdgeLength trait implementation for TransitEdge. Returns the Euclidean length of the TransitEdge.