pub trait EdgeIndexable: GraphBase {
    // Required methods
    fn edge_bound(&self) -> usize;
    fn to_index(&self, a: Self::EdgeId) -> usize;
    fn from_index(&self, i: usize) -> Self::EdgeId;
}
Expand description

The graph’s NodeIds map to indices

Required Methods§

source

fn edge_bound(&self) -> usize

Return an upper bound of the edge indices in the graph (suitable for the size of a bitmap).

source

fn to_index(&self, a: Self::EdgeId) -> usize

Convert a to an integer index.

source

fn from_index(&self, i: usize) -> Self::EdgeId

Convert i to an edge index. i must be a valid value in the graph.

Implementations on Foreign Types§

source§

impl<'a, G> EdgeIndexable for &'a Gwhere G: EdgeIndexable,

source§

fn edge_bound(&self) -> usize

source§

fn to_index(&self, a: Self::EdgeId) -> usize

source§

fn from_index(&self, i: usize) -> Self::EdgeId

Implementors§

source§

impl<'a, G> EdgeIndexable for Frozen<'a, G>where G: EdgeIndexable,

source§

impl<G> EdgeIndexable for Reversed<G>where G: EdgeIndexable,

source§

impl<G, F> EdgeIndexable for EdgeFiltered<G, F>where G: EdgeIndexable,

source§

impl<G, F> EdgeIndexable for NodeFiltered<G, F>where G: EdgeIndexable,

source§

impl<N, E, Ty> EdgeIndexable for GraphMap<N, E, Ty>where N: NodeTrait, Ty: EdgeType,

source§

impl<N, E, Ty, Ix> EdgeIndexable for Graph<N, E, Ty, Ix>where Ty: EdgeType, Ix: IndexType,

source§

impl<N, E, Ty, Ix> EdgeIndexable for StableGraph<N, E, Ty, Ix>where Ty: EdgeType, Ix: IndexType,