src/main/java/de/dfki/lt/loot/digraph/DirectedBiGraph.java
private void dfsVisitInverse(int vertex,
                        GraphVisitor<EdgeInfo> visitor,
                        BitSet visited) {
    visited.set(vertex);  // vertex gets gray
    visitor.discoverVertex(vertex, this);

    for (Edge<EdgeInfo> edge : getInEdges(vertex)) {
      int target = edge.getTarget();
      // is the target vertex white?
      if (! visited.get(target)) {
        visitor.treeEdge(edge, this);
        dfsVisitInverse(target, visitor, visited);
      } else {
        visitor.nonTreeEdge(edge, this);
      }
    }
    // vertex gets black
    visitor.finishVertex(vertex, this);
  }
/** Recursive helper function for the dfs methods */
Recursive helper function for the dfs methods
Recursive helper function for the dfs methods
private void dfsVisitInverse(int vertex,
                        GraphVisitor<EdgeInfo> visitor,
                        BitSet visited) {
    visited.set(vertex);  
    visitor.discoverVertex(vertex, this);
    for (Edge<EdgeInfo> edge : getInEdges(vertex)) {
      int target = edge.getTarget();
      if (! visited.get(target)) {
        visitor.treeEdge(edge, this);
        dfsVisitInverse(target, visitor, visited);
      } else {
        visitor.nonTreeEdge(edge, this);
      }
    }
    visitor.finishVertex(vertex, this);
  }
private void dfsVisitInverse ( int vertex , GraphVisitor < EdgeInfo > visitor , BitSet visited ) { visited . set ( vertex ) ; visitor . discoverVertex ( vertex , this ) ; for ( Edge < EdgeInfo > edge : getInEdges ( vertex ) ) { int target = edge . getTarget ( ) ; if ( ! visited . get ( target ) ) { visitor . treeEdge ( edge , this ) ; dfsVisitInverse ( target , visitor , visited ) ; } else { visitor . nonTreeEdge ( edge , this ) ; } } visitor . finishVertex ( vertex , this ) ; }
Recursive helper function for the dfs methods
Recursive helper function for the dfs methods
// vertex gets gray // is the target vertex white? // vertex gets black