public class PredicatedParallelEdgeIndexFunction<V,E>
extends java.lang.Object
implements edu.uci.ics.jung.graph.util.EdgeIndexFunction<V,E>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<E,java.lang.Integer> |
edge_index |
protected org.apache.commons.collections4.Predicate<E> |
predicate |
Modifier and Type | Method and Description |
---|---|
int |
getIndex(edu.uci.ics.jung.graph.Graph<V,E> graph,
E e)
Returns the index for the specified edge.
|
protected int |
getIndex(edu.uci.ics.jung.graph.Graph<V,E> graph,
E e,
V v) |
protected int |
getIndex(edu.uci.ics.jung.graph.Graph<V,E> graph,
E e,
V v,
V u) |
static <V,E> PredicatedParallelEdgeIndexFunction<V,E> |
getInstance() |
org.apache.commons.collections4.Predicate<E> |
getPredicate() |
void |
reset()
Clears all edge indices for all edges in all graphs.
|
void |
reset(edu.uci.ics.jung.graph.Graph<V,E> graph,
E e)
Resets the indices for this edge and its parallel edges.
|
void |
setPredicate(org.apache.commons.collections4.Predicate<E> predicate) |
protected java.util.Map<E,java.lang.Integer> edge_index
protected org.apache.commons.collections4.Predicate<E> predicate
public static <V,E> PredicatedParallelEdgeIndexFunction<V,E> getInstance()
public int getIndex(edu.uci.ics.jung.graph.Graph<V,E> graph, E e)
e
and for all edges parallel
to e
.public org.apache.commons.collections4.Predicate<E> getPredicate()
public void setPredicate(org.apache.commons.collections4.Predicate<E> predicate)
predicate
- the predicate to setpublic void reset(edu.uci.ics.jung.graph.Graph<V,E> graph, E e)
e
has been added or removed.