edu.uci.ics.jung.algorithms.filters
Class EdgePredicateFilter<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.filters.EdgePredicateFilter<V,E>
- All Implemented Interfaces:
- Filter<V,E>, org.apache.commons.collections15.Transformer<Graph<V,E>,Graph<V,E>>
public class EdgePredicateFilter<V,E>
- extends Object
- implements Filter<V,E>
Transforms the input graph into one which contains only those edges
that pass the specified Predicate
. The filtered graph
is a copy of the original graph (same type, uses the same vertex and
edge objects). All vertices from the original graph
are copied into the new graph (even if they are not incident to any
edges in the new graph).
- Author:
- Joshua O'Madadhain
Field Summary |
protected org.apache.commons.collections15.Predicate<E> |
edge_pred
|
Constructor Summary |
EdgePredicateFilter(org.apache.commons.collections15.Predicate<E> edge_pred)
Creates an instance based on the specified edge Predicate . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
edge_pred
protected org.apache.commons.collections15.Predicate<E> edge_pred
EdgePredicateFilter
public EdgePredicateFilter(org.apache.commons.collections15.Predicate<E> edge_pred)
- Creates an instance based on the specified edge
Predicate
.
- Parameters:
edge_pred
- the predicate that specifies which edges to add to the filtered graph
transform
public Graph<V,E> transform(Graph<V,E> g)
- Specified by:
transform
in interface org.apache.commons.collections15.Transformer<Graph<V,E>,Graph<V,E>>
Copyright © 2011. All Rights Reserved.