You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/11/20 18:09:29 UTC

svn commit: r1204191 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java

Author: simonetripodi
Date: Sun Nov 20 17:09:29 2011
New Revision: 1204191

URL: http://svn.apache.org/viewvc?rev=1204191&view=rev
Log:
don't perform graph visit inside the handler, just let the DFS algorithm doing it and handle visit events

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java?rev=1204191&r1=1204190&r2=1204191&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/ssc/CheriyanMehlhornGabowVisitHandler.java Sun Nov 20 17:09:29 2011
@@ -54,7 +54,6 @@ final class CheriyanMehlhornGabowVisitHa
         this.marked = marked;
     }
 
-
     /**
      * {@inheritDoc}
      */
@@ -64,15 +63,18 @@ final class CheriyanMehlhornGabowVisitHa
         marked.add( vertex );
         s.push( vertex );
         p.push( vertex );
+    }
 
-        for ( V adjacent : graph.getOutbound( vertex ) )
+    /**
+     * {@inheritDoc}
+     */
+    public void discoverEdge( V head, E edge, V tail )
+    {
+        if ( !marked.contains( tail ) )
         {
-            if ( !marked.contains( adjacent ) )
-            {
-                depthFirstSearch( graph, adjacent, this );
-            }
-            // TODO else...
+            depthFirstSearch( graph, tail, this );
         }
+        // TODO else...
     }
 
 }