public class IncidentEdgeIndexFunction<V,E> extends java.lang.Object implements EdgeIndexFunction<V,E>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<E,java.lang.Integer> |
edge_index |
Modifier and Type | Method and Description |
---|---|
int |
getIndex(Graph<V,E> graph,
E e)
Returns the index for the specified edge.
|
protected int |
getIndex(Graph<V,E> graph,
E e,
V v) |
protected int |
getIndex(Graph<V,E> graph,
E e,
V u,
V v) |
static <V,E> IncidentEdgeIndexFunction<V,E> |
getInstance()
Returns an instance of this type.
|
void |
reset()
Clears all edge indices for all edges in all graphs.
|
void |
reset(Graph<V,E> graph,
E e)
Resets the indices for this edge and its parallel edges.
|
protected java.util.Map<E,java.lang.Integer> edge_index
public static <V,E> IncidentEdgeIndexFunction<V,E> getInstance()
V
- the vertex typeE
- the edge typepublic int getIndex(Graph<V,E> graph, E e)
e
and for all edges parallel
to e
.getIndex
in interface EdgeIndexFunction<V,E>
graph
- the graph in which the edge is to be queriede
- the edge whose index is to be queriede
's index in graph
public void reset(Graph<V,E> graph, E e)
e
has been added or removed.reset
in interface EdgeIndexFunction<V,E>
e
- graph
- the graph in which edge
's index is to be resetpublic void reset()
reset
in interface EdgeIndexFunction<V,E>
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence