pub struct CCH { /* private fields */ }
Implementations§
Source§impl CCH
impl CCH
Sourcepub fn new(
order: &[u32],
tail: &[u32],
head: &[u32],
filter_always_inf_arcs: bool,
) -> Self
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 arci
as(tail[i], head[i])
. The ordering routine treats them as undirected; here they stay directed for queries.filter_always_inf_arcs
– iftrue
, arcs whose weight will always be interpreted as an application defined ‘infinity’ placeholder may be removed during construction to reduce index size. (Typically keepfalse
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> 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