com.google.javascript.jscomp.graph
Class GraphPruner<N,E>

java.lang.Object
  extended by com.google.javascript.jscomp.graph.GraphPruner<N,E>

public class GraphPruner<N,E>
extends Object

Prunes a graph, creating a new graph with nodes removed. If a node is removed from the graph, any paths through that node will be replaced with edges. In other words, if A and B are nodes in the original graph and the pruned graph, then there exists a path from A -> B in the original graph iff there's a path from A -> B in the pruned graph. We do not make any guarantees about what edges are in the pruned graph.


Constructor Summary
GraphPruner(DiGraph<N,E> graph)
           
 
Method Summary
 LinkedDirectedGraph<N,E> prune(com.google.common.base.Predicate<N> keep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphPruner

public GraphPruner(DiGraph<N,E> graph)
Method Detail

prune

public LinkedDirectedGraph<N,E> prune(com.google.common.base.Predicate<N> keep)