Trait rs_graph::traits::refs::IndexGraphRef
source · pub trait IndexGraphRef<'a>: UndirectedRef<'a> {
// Required methods
fn node_id(&self, u: Self::Node) -> usize;
fn id2node(&self, id: usize) -> Self::Node;
fn edge_id(&self, e: Self::Edge) -> usize;
fn id2edge(&self, id: usize) -> Self::Edge;
}
Expand description
A reference to an indexed graph.
This trait contains methods with a unrestricted lifetime for self
.
Required Methods§
sourcefn id2node(&self, id: usize) -> Self::Node
fn id2node(&self, id: usize) -> Self::Node
Return the node associated with the given id.
The method panics if the id is invalid.