pub struct TravelTimeMatrix { /* private fields */ }Implementations§
Source§impl TravelTimeMatrix
impl TravelTimeMatrix
Sourcepub fn get(&self, from: usize, to: usize) -> Option<i64>
pub fn get(&self, from: usize, to: usize) -> Option<i64>
Get the travel time from one location to another.
Returns None if indices are out of bounds.
Returns Some(UNREACHABLE) if the pair is not reachable.
pub fn is_reachable(&self, from: usize, to: usize) -> bool
pub fn size(&self) -> usize
pub fn locations(&self) -> &[SnappedCoord]
pub fn row(&self, i: usize) -> Option<&[i64]>
pub fn min(&self) -> Option<i64>
pub fn max(&self) -> Option<i64>
pub fn mean(&self) -> Option<f64>
pub fn reachability_ratio(&self) -> f64
pub fn unreachable_pairs(&self) -> Vec<(usize, usize)>
pub fn as_slice(&self) -> &[i64]
Trait Implementations§
Source§impl Clone for TravelTimeMatrix
impl Clone for TravelTimeMatrix
Source§fn clone(&self) -> TravelTimeMatrix
fn clone(&self) -> TravelTimeMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TravelTimeMatrix
impl Debug for TravelTimeMatrix
Source§impl Default for TravelTimeMatrix
impl Default for TravelTimeMatrix
Source§fn default() -> TravelTimeMatrix
fn default() -> TravelTimeMatrix
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TravelTimeMatrix
impl RefUnwindSafe for TravelTimeMatrix
impl Send for TravelTimeMatrix
impl Sync for TravelTimeMatrix
impl Unpin for TravelTimeMatrix
impl UnwindSafe for TravelTimeMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more