pub struct Metric {
pub forward: Vec<u32>,
pub backward: Vec<u32>,
}Expand description
A customized metric: the forward + backward shortcut weights of every CCH
arc. Field semantics match the persisted .cch-metric sections and
crate::bundle::MetricView.
Fields§
§forward: Vec<u32>forward[arc] → shortcut weight in the up→down direction. Length =
cch_arc_count. INF_WEIGHT marks an unreachable arc.
backward: Vec<u32>backward[arc] → shortcut weight in the down→up direction. Length =
cch_arc_count.
Implementations§
Source§impl Metric
impl Metric
Sourcepub fn view(&self) -> MetricView<'_>
pub fn view(&self) -> MetricView<'_>
Borrow this in-memory metric as a MetricView — the
query-ready view consumed by distance_matrix
and node_path.
Trait Implementations§
impl Eq for Metric
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
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> 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