[−][src]Trait rs_graph::traits::IndexGraph
Associates nodes and edges with unique ids.
Required methods
fn node_id(&self, u: Self::Node) -> usize
Return a unique id associated with a node.
fn id2node(&'a self, id: usize) -> Self::Node
Return the node associated with the given id.
The method panics if the id is invalid.
fn edge_id(&self, e: Self::Edge) -> usize
Return a unique id associated with an edge.
The returned id is the same for the edge and its reverse edge.
fn id2edge(&'a self, id: usize) -> Self::Edge
Return the edge associated with the given id.
The method returns the forward edge.
The method panics if the id is invalid.
Implementations on Foreign Types
impl<'a, 'g: 'a, G> IndexGraph<'a> for &'g G where
G: IndexGraph<'g>,
[src]
G: IndexGraph<'g>,
fn node_id(&self, u: Self::Node) -> usize
[src]
fn id2node(&'a self, id: usize) -> Self::Node
[src]
fn edge_id(&self, e: Self::Edge) -> usize
[src]
fn id2edge(&'a self, id: usize) -> Self::Edge
[src]
Implementors
impl<'a, G> IndexGraph<'a> for Network<G> where
G: Digraph<'a> + IndexGraph<'a>,
[src]
G: Digraph<'a> + IndexGraph<'a>,
fn node_id(&self, u: Self::Node) -> usize
[src]
fn id2node(&'a self, id: usize) -> Self::Node
[src]
fn edge_id(&self, e: Self::Edge) -> usize
[src]
fn id2edge(&'a self, id: usize) -> Self::Edge
[src]
impl<'a, G> IndexGraph<'a> for ReverseDigraph<G> where
G: IndexGraph<'a>,
[src]
G: IndexGraph<'a>,
fn node_id(&self, u: Self::Node) -> usize
[src]
fn id2node(&'a self, id: usize) -> Self::Node
[src]
fn edge_id(&self, e: Self::Edge) -> usize
[src]
fn id2edge(&'a self, id: usize) -> Self::Edge
[src]
impl<'a, G, Gx, Nx, Ex> IndexGraph<'a> for Attributed<G, Gx, Nx, Ex> where
G: IndexGraph<'a>,
Gx: Default,
Nx: Default,
Ex: Default,
[src]
G: IndexGraph<'a>,
Gx: Default,
Nx: Default,
Ex: Default,
fn node_id(&self, u: Self::Node) -> usize
[src]
fn id2node(&'a self, id: usize) -> Self::Node
[src]
fn edge_id(&self, e: Self::Edge) -> usize
[src]
fn id2edge(&'a self, id: usize) -> Self::Edge
[src]
impl<'a, ID, N: 'a, E: 'a> IndexGraph<'a> for LinkedListGraph<ID, N, E> where
ID: 'a + PrimInt + Unsigned,
[src]
ID: 'a + PrimInt + Unsigned,