Class VertexPredicateFilter<V,​E>

  • All Implemented Interfaces:
    Filter<V,​E>, org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.Graph<V,​E>,​edu.uci.ics.jung.graph.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 specified Predicate. 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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.commons.collections4.Predicate<V> vertex_pred  
    • Constructor Summary

      Constructors 
      Constructor Description
      VertexPredicateFilter​(org.apache.commons.collections4.Predicate<V> vertex_pred)
      Creates an instance based on the specified vertex Predicate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      edu.uci.ics.jung.graph.Graph<V,​E> transform​(edu.uci.ics.jung.graph.Graph<V,​E> g)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • vertex_pred

        protected org.apache.commons.collections4.Predicate<V> vertex_pred
    • Constructor Detail

      • VertexPredicateFilter

        public VertexPredicateFilter​(org.apache.commons.collections4.Predicate<V> vertex_pred)
        Creates an instance based on the specified vertex Predicate.
        Parameters:
        vertex_pred - the predicate that specifies which vertices to add to the filtered graph
    • Method Detail

      • transform

        public edu.uci.ics.jung.graph.Graph<V,​E> transform​(edu.uci.ics.jung.graph.Graph<V,​E> g)
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<V,​E>