Class VertexPredicateFilter<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.filters.VertexPredicateFilter<V,E>
-
- All Implemented Interfaces:
com.google.common.base.Function<Graph<V,E>,Graph<V,E>>
,Filter<V,E>
,java.util.function.Function<Graph<V,E>,Graph<V,E>>
public class VertexPredicateFilter<V,E> extends java.lang.Object implements Filter<V,E>
Transforms the input graph into one which contains only those vertices that pass the specifiedPredicate
. The filtered graph is a copy of the original graph (same type, uses the same vertex and edge objects). Only those edges whose entire incident vertex collection passes the predicate are copied into the new graph.- Author:
- Joshua O'Madadhain
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.base.Predicate<V>
vertex_pred
-
Constructor Summary
Constructors Constructor Description VertexPredicateFilter(com.google.common.base.Predicate<V> vertex_pred)
Creates an instance based on the specified vertexPredicate
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Graph<V,E>
apply(Graph<V,E> g)
-
-
-
Field Detail
-
vertex_pred
protected com.google.common.base.Predicate<V> vertex_pred
-
-
Constructor Detail
-
VertexPredicateFilter
public VertexPredicateFilter(com.google.common.base.Predicate<V> vertex_pred)
Creates an instance based on the specified vertexPredicate
.- Parameters:
vertex_pred
- the predicate that specifies which vertices to add to the filtered graph
-
-