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 NodeId
s map to indices
Required Methods§
Sourcefn edge_bound(&self) -> usize
fn edge_bound(&self) -> usize
Return an upper bound of the edge indices in the graph (suitable for the size of a bitmap).
Sourcefn from_index(&self, i: usize) -> Self::EdgeId
fn from_index(&self, i: usize) -> Self::EdgeId
Convert i
to an edge index. i
must be a valid value in the graph.