|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.javascript.jscomp.graph.FixedPointGraphTraversal<N,E>
N - Value type that the graph node stores.E - Value type that the graph edge stores.public final class FixedPointGraphTraversal<N,E>
A utility class for doing fixed-point computations. We traverse the edges over the given directed graph until the graph reaches a steady state.
| Nested Class Summary | |
|---|---|
static interface |
FixedPointGraphTraversal.EdgeCallback<Node,Edge>
|
| Field Summary | |
|---|---|
static String |
NON_HALTING_ERROR_MSG
|
| Constructor Summary | |
|---|---|
FixedPointGraphTraversal(FixedPointGraphTraversal.EdgeCallback<N,E> callback)
Create a new traversal. |
|
| Method Summary | ||
|---|---|---|
void |
computeFixedPoint(DiGraph<N,E> graph)
Compute a fixed point for the given graph. |
|
void |
computeFixedPoint(DiGraph<N,E> graph,
N entry)
Compute a fixed point for the given graph, entering from the given node. |
|
void |
computeFixedPoint(DiGraph<N,E> graph,
Set<N> entrySet)
Compute a fixed point for the given graph, entering from the given nodes. |
|
static
|
newTraversal(FixedPointGraphTraversal.EdgeCallback<NODE,EDGE> callback)
Helper method for creating new traversals. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NON_HALTING_ERROR_MSG
| Constructor Detail |
|---|
public FixedPointGraphTraversal(FixedPointGraphTraversal.EdgeCallback<N,E> callback)
callback - A callback for updating the state of the graph each
time an edge is traversed.| Method Detail |
|---|
public static <NODE,EDGE> FixedPointGraphTraversal<NODE,EDGE> newTraversal(FixedPointGraphTraversal.EdgeCallback<NODE,EDGE> callback)
public void computeFixedPoint(DiGraph<N,E> graph)
graph - The graph to traverse.
public void computeFixedPoint(DiGraph<N,E> graph,
N entry)
graph - The graph to traverse.entry - The node to begin traversing from.
public void computeFixedPoint(DiGraph<N,E> graph,
Set<N> entrySet)
graph - The graph to traverse.entrySet - The nodes to begin traversing from.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||