public static GraphOrder backwardGraph(Graph graph) { GraphOrder result = new GraphOrder(); NodeBitMap visited = graph.createNodeBitMap(); for (Node node : forwardGraph(graph)) { result.visitBackward(visited, node); } return result; }
public static GraphOrder forwardGraph(Graph graph) { GraphOrder result = new GraphOrder(); NodeBitMap visited = graph.createNodeBitMap(); for (ControlSinkNode node : graph.getNodes(ControlSinkNode.class)) { result.visitForward(visited, node); } return result; }