petgraph::visit

Trait EdgeIndexable

Source
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 G
where 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, 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,

Source§

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