Class GraphSlicer


  • public class GraphSlicer
    extends java.lang.Object
    Utilities related to simple graph subset operations.
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphSlicer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <E> AbstractGraph<E> project​(Graph<E> G, java.util.function.Predicate<E> fmember)  
      static <T> Graph<T> prune​(Graph<T> g, java.util.function.Predicate<T> p)
      Prune a graph to only the nodes accepted by the Predicate p
      static <T> java.util.Set<T> slice​(Graph<T> g, java.util.function.Predicate<T> p)
      Performs a backward slice.
      • Methods inherited from class java.lang.Object

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

      • GraphSlicer

        public GraphSlicer()
    • Method Detail

      • slice

        public static <T> java.util.Set<T> slice​(Graph<T> g,
                                                 java.util.function.Predicate<T> p)
        Performs a backward slice.
        Type Parameters:
        T - type for nodes
        Parameters:
        g - the graph to slice
        p - identifies targets for the backward slice
        Returns:
        the set of nodes in g, from which any of the targets (nodes that f accepts) is reachable.
      • prune

        public static <T> Graph<T> prune​(Graph<T> g,
                                         java.util.function.Predicate<T> p)
        Prune a graph to only the nodes accepted by the Predicate p
      • project

        public static <E> AbstractGraph<E> project​(Graph<E> G,
                                                   java.util.function.Predicate<E> fmember)