CCH

Struct CCH 

Source
pub struct CCH { /* private fields */ }

Implementations§

Source§

impl CCH

Source

pub fn new( order: &[u32], tail: &[u32], head: &[u32], filter_always_inf_arcs: bool, ) -> Self

Construct a new immutable Customizable Contraction Hierarchy index.

Parameters:

  • order – permutation of node ids (length = node count) produced by a fill‑in reducing nested dissection heuristic (e.g. compute_order_inertial) or a lightweight fallback.
  • tail, head – parallel arrays encoding each directed arc i as (tail[i], head[i]). The ordering routine treats them as undirected; here they stay directed for queries.
  • filter_always_inf_arcs – if true, arcs whose weight will always be interpreted as an application defined ‘infinity’ placeholder may be removed during construction to reduce index size. (Typically keep false unless you prepared such a list.)

Cost: preprocessing is more expensive than a single customization but usually far cheaper than building a full classical CH of the same quality. Construction copies the input slices; you may drop them afterwards.

Thread-safety: resulting object is Send + Sync and read-only.

Panics: never (undefined behavior if input slices have inconsistent lengths – guarded by cxx).

Auto Trait Implementations§

§

impl Freeze for CCH

§

impl RefUnwindSafe for CCH

§

impl Send for CCH

§

impl Sync for CCH

§

impl Unpin for CCH

§

impl UnwindSafe for CCH

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.