Skip to main content

NodeIndex

Trait NodeIndex 

Source
pub trait NodeIndex: ElementIndex {
    // Provided methods
    fn node_bound(&self) -> usize { ... }
    fn node_index(&self, node: Self::ElementId) -> usize { ... }
}
Expand description

Dense node-index capability for graph views.

Graph-facing name for ElementIndex. Lets graph algorithms allocate per-node scratch storage such as visited sets or distance arrays.

Provided Methods§

Source

fn node_bound(&self) -> usize

Returns the exclusive upper bound for node indexes in this graph view.

Source

fn node_index(&self, node: Self::ElementId) -> usize

Returns the dense index for node in this graph view.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> NodeIndex for T
where T: ElementIndex,