Package org.jungrapht.visualization.util
Interface EdgeIndexFunction<V,E>
-
- All Superinterfaces:
BiFunction<org.jgrapht.Graph<V,E>,E,Integer>
- All Known Implementing Classes:
ParallelEdgeIndexFunction,PredicatedParallelEdgeIndexFunction
public interface EdgeIndexFunction<V,E> extends BiFunction<org.jgrapht.Graph<V,E>,E,Integer>
An interface for a service to access the index of a given edge (in a givenGraph) into the set formed by the given edge and all the other edges it is parallel to.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.- Author:
- Tom Nelson
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Integerapply(org.jgrapht.Graph<V,E> graph, E e)The index ofeis defined as its position in some consistent ordering ofeand all edges parallel toe.default voidreset()Clears all edge indices for all edges.default voidreset(org.jgrapht.Graph<V,E> graph, E e)Resets the indices foredgeand its parallel edges.-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
apply
default Integer apply(org.jgrapht.Graph<V,E> graph, E e)
The index ofeis defined as its position in some consistent ordering ofeand all edges parallel toe.
-
reset
default void reset(org.jgrapht.Graph<V,E> graph, E e)
Resets the indices foredgeand its parallel edges. Should be invoked when an edge parallel toedgehas been added or removed.- Parameters:
graph- the graph and the edge whose index is to be reset
-
reset
default void reset()
Clears all edge indices for all edges. Does not recalculate the indices.
-
-