Class IncidentEdgeIndexFunction<V,E>
java.lang.Object
edu.uci.ics.jung.graph.util.IncidentEdgeIndexFunction<V,E>
- All Implemented Interfaces:
EdgeIndexFunction<V,E>
A class which creates and maintains indices for incident edges.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index for the specified edge.protected intprotected intstatic <V,E> IncidentEdgeIndexFunction <V, E> voidreset()Clears all edge indices for all edges in all graphs.voidResets the indices for this edge and its parallel edges.
-
Field Details
-
edge_index
-
-
Constructor Details
-
IncidentEdgeIndexFunction
private IncidentEdgeIndexFunction()
-
-
Method Details
-
getInstance
- Type Parameters:
V- the vertex typeE- the edge type- Returns:
- an instance of this type.
-
getIndex
Returns the index for the specified edge. Calculates the indices foreand for all edges parallel toe.- Specified by:
getIndexin interfaceEdgeIndexFunction<V,E> - Parameters:
graph- the graph with respect to which the index is calculatede- the edge whose index is to be queried- Returns:
e's index ingraph
-
getIndex
-
getIndex
-
reset
Resets the indices for this edge and its parallel edges. Should be invoked when an edge parallel toehas been added or removed.- Specified by:
resetin interfaceEdgeIndexFunction<V,E> - Parameters:
graph- the graph whose indices are to be resete- the edge whose associated indices are to be reset
-
reset
public void reset()Clears all edge indices for all edges in all graphs. Does not recalculate the indices.- Specified by:
resetin interfaceEdgeIndexFunction<V,E>
-