public class PredicatedParallelEdgeIndexFunction<V,E> extends Object implements EdgeIndexFunction<V,E>
| Modifier and Type | Field and Description |
|---|---|
protected Map<E,Integer> |
edge_index |
protected com.google.common.base.Predicate<E> |
predicate |
| 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 v,
V u) |
static <V,E> PredicatedParallelEdgeIndexFunction<V,E> |
getInstance() |
com.google.common.base.Predicate<E> |
getPredicate() |
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.
|
void |
setPredicate(com.google.common.base.Predicate<E> predicate) |
protected com.google.common.base.Predicate<E> predicate
public static <V,E> PredicatedParallelEdgeIndexFunction<V,E> getInstance()
public 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 calculatedpublic com.google.common.base.Predicate<E> getPredicate()
public void setPredicate(com.google.common.base.Predicate<E> predicate)
public void reset(Graph<V,E> graph, E e)
e
has been added or removed in this graph.reset in interface EdgeIndexFunction<V,E>graph - the graph with respect to which the index is calculatede - the edge whose indices are to be reset for graphpublic void reset()
reset in interface EdgeIndexFunction<V,E>Copyright © 2016. All rights reserved.