pub trait CchGraph {
// Required methods
fn num_nodes(&self) -> usize;
fn num_edges(&self) -> usize;
fn first_out(&self) -> &[u32];
fn head(&self) -> &[u32];
fn x(&self, node_id: u32) -> f32;
fn y(&self, node_id: u32) -> f32;
// Provided methods
fn edge_indices(&self, u: usize) -> Range<usize> { ... }
fn neighbors(&self, u: u32) -> impl Iterator<Item = u32> + '_ { ... }
}Expand description
The base graph representation required by the CCH engine.
This trait abstracts the underlying memory layout of your road network, providing the core structural queries needed to build the elimination tree.
Required Methods§
Provided Methods§
Sourcefn edge_indices(&self, u: usize) -> Range<usize>
fn edge_indices(&self, u: usize) -> Range<usize>
Returns the range of edge indices originating from node u.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.