示例#1
0
  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;
  }
示例#2
0
  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;
  }