public interface EdgeIndexFunction<V,E>
Note that in current use, this index is assumed to be an integer value in
the interval [0,n-1], where n-1 is the number of edges parallel to e
.
Modifier and Type | Method and Description |
---|---|
int |
getIndex(Graph<V,E> graph,
E e)
Returns
e 's index in graph . |
void |
reset()
Clears all edge indices for all edges in all graphs.
|
void |
reset(Graph<V,E> g,
E edge)
Resets the indices for
edge and its parallel edges in graph . |
int getIndex(Graph<V,E> graph, E e)
e
's index in graph
.
The index of e
is defined as its position in some
consistent ordering of e
and all edges parallel to e
.graph
- the graph in which the edge is to be queriede
- the edge whose index is to be queriede
's index in graph
void reset(Graph<V,E> g, E edge)
edge
and its parallel edges in graph
.
Should be invoked when an edge parallel to edge
has been added or removed.g
- the graph in which edge
's index is to be resetedge
- the edge whose index is to be resetvoid reset()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence