public class IncidentEdgeIndexFunction<V,E> extends Object implements EdgeIndexFunction<V,E>
| Modifier and Type | Field and Description |
|---|---|
protected Map<E,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() |
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.
|
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 with respect to which the index is calculatede - the edge whose index is to be queriede's index in graphpublic void reset(Graph<V,E> graph, E e)
e
has been added or removed.reset in interface EdgeIndexFunction<V,E>graph - the graph whose indices are to be resete - the edge whose associated indices are to be resetpublic void reset()
reset in interface EdgeIndexFunction<V,E>Copyright © 2016. All rights reserved.