commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1305253 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph: connectivity/ConnectedComponentHandler.java flow/FlowNetworkHandler.java
Date Mon, 26 Mar 2012 07:47:24 GMT
Author: simonetripodi
Date: Mon Mar 26 07:47:24 2012
New Revision: 1305253

URL: http://svn.apache.org/viewvc?rev=1305253&view=rev
Log:
just statically imported VisitState values

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/connectivity/ConnectedComponentHandler.java
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/flow/FlowNetworkHandler.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/connectivity/ConnectedComponentHandler.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/connectivity/ConnectedComponentHandler.java?rev=1305253&r1=1305252&r2=1305253&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/connectivity/ConnectedComponentHandler.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/connectivity/ConnectedComponentHandler.java
Mon Mar 26 07:47:24 2012
@@ -19,6 +19,8 @@ package org.apache.commons.graph.connect
  * under the License.
  */
 
+import static org.apache.commons.graph.visit.VisitState.CONTINUE;
+
 import java.util.LinkedList;
 import java.util.List;
 
@@ -47,7 +49,7 @@ final class ConnectedComponentHandler<V,
     {
         untouchedVertices.remove( vertex );
         touchedVertices.add( vertex );
-        return VisitState.CONTINUE;
+        return CONTINUE;
     }
 
     /**

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/flow/FlowNetworkHandler.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/flow/FlowNetworkHandler.java?rev=1305253&r1=1305252&r2=1305253&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/flow/FlowNetworkHandler.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/flow/FlowNetworkHandler.java
Mon Mar 26 07:47:24 2012
@@ -19,6 +19,10 @@ package org.apache.commons.graph.flow;
  * under the License.
  */
 
+import static org.apache.commons.graph.visit.VisitState.ABORT;
+import static org.apache.commons.graph.visit.VisitState.CONTINUE;
+import static org.apache.commons.graph.visit.VisitState.SKIP;
+
 import java.util.HashMap;
 import java.util.Map;
 
@@ -147,10 +151,10 @@ class FlowNetworkHandler<V, E, W>
         // avoid expanding the edge when it has no residual capacity
         if ( weightOperations.compare( residualEdgeCapacity, weightOperations.identity()
) <= 0 )
         {
-            return VisitState.SKIP;
+            return SKIP;
         }
         predecessors.addPredecessor( tail, head );
-        return VisitState.CONTINUE;
+        return CONTINUE;
     }
 
     /**
@@ -158,7 +162,7 @@ class FlowNetworkHandler<V, E, W>
      */
     public VisitState discoverVertex( V vertex )
     {
-        return !vertex.equals( target ) ? VisitState.CONTINUE : VisitState.SKIP;
+        return !vertex.equals( target ) ? CONTINUE : SKIP;
     }
 
     /**
@@ -170,9 +174,9 @@ class FlowNetworkHandler<V, E, W>
         {
             // search ends when target vertex is reached
             foundAugmentingPath = true;
-            return VisitState.ABORT;
+            return ABORT;
         }
-        return VisitState.CONTINUE;
+        return CONTINUE;
     }
 
     @Override



Mime
View raw message