commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1136926 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
Date Fri, 17 Jun 2011 16:25:25 GMT
Author: simonetripodi
Date: Fri Jun 17 16:25:24 2011
New Revision: 1136926

URL: http://svn.apache.org/viewvc?rev=1136926&view=rev
Log:
Dijkstra's implementation needs to use the WeightedPath implementation

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java?rev=1136926&r1=1136925&r2=1136926&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
Fri Jun 17 16:25:24 2011
@@ -31,7 +31,7 @@ import org.apache.commons.graph.Vertex;
 import org.apache.commons.graph.WeightedEdge;
 import org.apache.commons.graph.WeightedGraph;
 import org.apache.commons.graph.WeightedPath;
-import org.apache.commons.graph.model.InMemoryPath;
+import org.apache.commons.graph.model.InMemoryWeightedPath;
 
 /**
  * 
@@ -81,7 +81,8 @@ public final class Dijkstra
             // destination reached, stop and build the path
             if ( target.equals( vertex ) )
             {
-                InMemoryPath<V, WE> path = new InMemoryPath<V, WE>( source, target,
shortestDistances.get( target ) );
+                InMemoryWeightedPath<V, WE> path =
+                    new InMemoryWeightedPath<V, WE>( source, target, shortestDistances.get(
target ) );
 
                 while ( !source.equals( vertex ) )
                 {



Mime
View raw message