commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c.@apache.org
Subject svn commit: r1292272 [2/2] - in /commons/sandbox/graph/trunk/src: changes/ main/java/org/apache/commons/graph/flow/ main/java/org/apache/commons/graph/model/ main/java/org/apache/commons/graph/shortestpath/ main/java/org/apache/commons/graph/spanning/ ...
Date Wed, 22 Feb 2012 13:21:05 GMT
Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/DijkstraTestCase.java
Wed Feb 22 13:21:03 2012
@@ -31,7 +31,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.DirectedMutableWeightedGraph;
 import org.apache.commons.graph.model.InMemoryWeightedPath;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 public final class DijkstraTestCase
@@ -41,7 +41,7 @@ public final class DijkstraTestCase
     public void testNullGraph()
     {
         // the actual weighted path
-        findShortestPath( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).from( null ).to( null ).applyingDijkstra( new DoubleWeight() );
+        findShortestPath( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).from( null ).to( null ).applyingDijkstra( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = NullPointerException.class )
@@ -51,7 +51,7 @@ public final class DijkstraTestCase
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
         // the actual weighted path
-        findShortestPath( graph ).from( null ).to( null ).applyingDijkstra( new DoubleWeight()
);
+        findShortestPath( graph ).from( null ).to( null ).applyingDijkstra( new DoubleWeightBaseOperations()
);
     }
 
     @Test( expected = NullPointerException.class )
@@ -81,7 +81,7 @@ public final class DijkstraTestCase
         graph.addVertex( b );
 
         // the actual weighted path
-        findShortestPath( graph ).from( a ).to( b ).applyingDijkstra( new DoubleWeight()
);
+        findShortestPath( graph ).from( a ).to( b ).applyingDijkstra( new DoubleWeightBaseOperations()
);
     }
 
     /**
@@ -126,7 +126,7 @@ public final class DijkstraTestCase
         // expected path
 
         InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, five, new DoubleWeight() );
+            new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, five, new DoubleWeightBaseOperations() );
 
         expected.addConnectionInTail( one, new BaseLabeledWeightedEdge<Double>( "1
-> 3", 9D ), three );
         expected.addConnectionInTail( three, new BaseLabeledWeightedEdge<Double>( "3
-> 6", 2D ), six );
@@ -134,7 +134,7 @@ public final class DijkstraTestCase
 
         // actual path
 
-        Path<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>> actual = findShortestPath(
graph ).from( one ).to( five ).applyingDijkstra( new DoubleWeight() );
+        Path<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>> actual = findShortestPath(
graph ).from( one ).to( five ).applyingDijkstra( new DoubleWeightBaseOperations() );
 
         // assert!
 

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/FloydWarshallTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/FloydWarshallTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/FloydWarshallTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/FloydWarshallTestCase.java
Wed Feb 22 13:21:03 2012
@@ -35,7 +35,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.DirectedMutableWeightedGraph;
 import org.apache.commons.graph.model.InMemoryWeightedPath;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 /**
@@ -47,7 +47,7 @@ public class FloydWarshallTestCase
     public void testNullGraph()
     {
         // the actual weighted path
-        findShortestPath( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).from( null ).to( null ).applyingDijkstra( new DoubleWeight() );
+        findShortestPath( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).from( null ).to( null ).applyingDijkstra( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = PathNotFoundException.class )
@@ -63,7 +63,7 @@ public class FloydWarshallTestCase
 
         // the actual weighted path
         AllVertexPairsShortestPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> p =
-            findShortestPath( graph ).applyingFloydWarshall( new DoubleWeight() );
+            findShortestPath( graph ).applyingFloydWarshall( new DoubleWeightBaseOperations()
);
 
         p.findShortestPath( a, b );
     }
@@ -116,7 +116,7 @@ public class FloydWarshallTestCase
         mutable.addEdge( six, new BaseLabeledWeightedEdge<Double>( "6 -> 5", 9D
), five );
 
         AllVertexPairsShortestPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> p =
-            findShortestPath( weighted ).applyingFloydWarshall( new DoubleWeight() );
+            findShortestPath( weighted ).applyingFloydWarshall( new DoubleWeightBaseOperations()
);
 
         if ( weighted instanceof UndirectedGraph )
         {
@@ -137,7 +137,7 @@ public class FloydWarshallTestCase
 
             // Expected
             InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-                new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, six, new DoubleWeight() );
+                new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, six, new DoubleWeightBaseOperations() );
             expected.addConnectionInTail( one, new BaseLabeledWeightedEdge<Double>(
"1 -> 3", 9D ), three );
             expected.addConnectionInTail( three, new BaseLabeledWeightedEdge<Double>(
"3 -> 6", 2D ), six );
 
@@ -165,7 +165,7 @@ public class FloydWarshallTestCase
             }
 
             InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-                new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, six, new DoubleWeight() );
+                new InMemoryWeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( one, six, new DoubleWeightBaseOperations() );
             expected.addConnectionInTail( one, new BaseLabeledWeightedEdge<Double>(
"1 -> 3", 9D ), three );
             expected.addConnectionInTail( three, new BaseLabeledWeightedEdge<Double>(
"3 -> 6", 2D ), six );
 

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/BoruvkaTestCase.java
Wed Feb 22 13:21:03 2012
@@ -31,7 +31,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.BaseLabeledWeightedEdge;
 import org.apache.commons.graph.model.MutableSpanningTree;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 public final class BoruvkaTestCase
@@ -40,7 +40,7 @@ public final class BoruvkaTestCase
     @Test( expected = NullPointerException.class )
     public void testNullGraph()
     {
-        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingBoruvkaAlgorithm( new DoubleWeight() );
+        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingBoruvkaAlgorithm( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = NullPointerException.class )
@@ -48,7 +48,7 @@ public final class BoruvkaTestCase
     {
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
-        minimumSpanningTree( input ).fromSource( null ).applyingBoruvkaAlgorithm( new DoubleWeight()
);
+        minimumSpanningTree( input ).fromSource( null ).applyingBoruvkaAlgorithm( new DoubleWeightBaseOperations()
);
     }
 
     @Test( expected = NullPointerException.class )
@@ -86,7 +86,7 @@ public final class BoruvkaTestCase
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
-        minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm( new
DoubleWeight() );
+        minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm( new
DoubleWeightBaseOperations() );
     }
 
     /**
@@ -131,7 +131,7 @@ public final class BoruvkaTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -148,7 +148,7 @@ public final class BoruvkaTestCase
         // Actual
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual =
-            minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm(
new DoubleWeight() );
+            minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm(
new DoubleWeightBaseOperations() );
 
         // assert!
 
@@ -172,7 +172,7 @@ public final class BoruvkaTestCase
         input.addVertex( new BaseLabeledVertex( "F" ) );
         input.addVertex( new BaseLabeledVertex( "G" ) );
 
-        minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm( new
DoubleWeight() );
+        minimumSpanningTree( input ).fromArbitrarySource().applyingBoruvkaAlgorithm( new
DoubleWeightBaseOperations() );
     }
 
 }

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/KruskalTestCase.java
Wed Feb 22 13:21:03 2012
@@ -31,7 +31,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.BaseLabeledWeightedEdge;
 import org.apache.commons.graph.model.MutableSpanningTree;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 public final class KruskalTestCase
@@ -40,7 +40,7 @@ public final class KruskalTestCase
     @Test( expected = NullPointerException.class )
     public void testNullGraph()
     {
-        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingKruskalAlgorithm( new DoubleWeight() );
+        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingKruskalAlgorithm( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = NullPointerException.class )
@@ -48,7 +48,7 @@ public final class KruskalTestCase
     {
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
-        minimumSpanningTree( input ).fromSource( null ).applyingKruskalAlgorithm( new DoubleWeight()
);
+        minimumSpanningTree( input ).fromSource( null ).applyingKruskalAlgorithm( new DoubleWeightBaseOperations()
);
     }
 
     @Test( expected = NullPointerException.class )
@@ -86,7 +86,7 @@ public final class KruskalTestCase
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
-        minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeight() );
+        minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeightBaseOperations() );
     }
     
     /**
@@ -137,7 +137,7 @@ public final class KruskalTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -153,7 +153,7 @@ public final class KruskalTestCase
 
         // Actual
 
-        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeight() );
+        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeightBaseOperations() );
 
         // assert!
 
@@ -188,7 +188,7 @@ public final class KruskalTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -198,7 +198,7 @@ public final class KruskalTestCase
 
         // Actual
 
-        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeight() );
+        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromArbitrarySource().applyingKruskalAlgorithm( new
DoubleWeightBaseOperations() );
 
         // assert!
 

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/PrimTestCase.java
Wed Feb 22 13:21:03 2012
@@ -31,7 +31,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.BaseLabeledWeightedEdge;
 import org.apache.commons.graph.model.MutableSpanningTree;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 public final class PrimTestCase
@@ -39,7 +39,7 @@ public final class PrimTestCase
     @Test( expected = NullPointerException.class )
     public void testNullGraph()
     {
-        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingPrimAlgorithm( new DoubleWeight() );
+        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).fromArbitrarySource().applyingPrimAlgorithm( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = NullPointerException.class )
@@ -48,7 +48,7 @@ public final class PrimTestCase
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
-        minimumSpanningTree( input ).fromSource( null ).applyingPrimAlgorithm( new DoubleWeight()
);
+        minimumSpanningTree( input ).fromSource( null ).applyingPrimAlgorithm( new DoubleWeightBaseOperations()
);
     }
 
     @Test( expected = NullPointerException.class )
@@ -86,7 +86,7 @@ public final class PrimTestCase
         UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> input =
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
-        minimumSpanningTree( input ).fromArbitrarySource().applyingPrimAlgorithm( new DoubleWeight()
);
+        minimumSpanningTree( input ).fromArbitrarySource().applyingPrimAlgorithm( new DoubleWeightBaseOperations()
);
     }
 
     /**
@@ -132,7 +132,7 @@ public final class PrimTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -198,7 +198,7 @@ public final class PrimTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -221,7 +221,7 @@ public final class PrimTestCase
     {
      // actual
 
-        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromSource( source ).applyingPrimAlgorithm( new DoubleWeight()
);
+        SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual = minimumSpanningTree( input ).fromSource( source ).applyingPrimAlgorithm( new DoubleWeightBaseOperations()
);
 
         // assert!
 

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java?rev=1292272&r1=1292271&r2=1292272&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/spanning/ReverseDeleteTestCase.java
Wed Feb 22 13:21:03 2012
@@ -30,7 +30,7 @@ import org.apache.commons.graph.model.Ba
 import org.apache.commons.graph.model.BaseLabeledWeightedEdge;
 import org.apache.commons.graph.model.MutableSpanningTree;
 import org.apache.commons.graph.model.UndirectedMutableWeightedGraph;
-import org.apache.commons.graph.weight.primitive.DoubleWeight;
+import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations;
 import org.junit.Test;
 
 /**
@@ -42,7 +42,7 @@ public class ReverseDeleteTestCase
     @Test( expected = NullPointerException.class )
     public void testNullGraph()
     {
-        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).applyingReverseDeleteAlgorithm( new DoubleWeight() );
+        minimumSpanningTree( (WeightedGraph<Vertex, WeightedEdge<Double>, Double>)
null ).applyingReverseDeleteAlgorithm( new DoubleWeightBaseOperations() );
     }
 
     @Test( expected = NullPointerException.class )
@@ -60,7 +60,7 @@ public class ReverseDeleteTestCase
             new UndirectedMutableWeightedGraph<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>();
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
tree =
-            minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new DoubleWeight()
);
+            minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new DoubleWeightBaseOperations()
);
 
         assertEquals( 0, tree.getOrder() );
         assertEquals( 0, tree.getSize() );
@@ -91,7 +91,7 @@ public class ReverseDeleteTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -102,7 +102,7 @@ public class ReverseDeleteTestCase
         expected.addEdge( c, new BaseLabeledWeightedEdge<Double>( "c <-> a",
4D ), a );
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual =
-                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeight() );
+                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeightBaseOperations() );
         assertEquals( expected, actual );
     }
 
@@ -126,7 +126,7 @@ public class ReverseDeleteTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -134,7 +134,7 @@ public class ReverseDeleteTestCase
         }
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual =
-                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeight() );
+                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeightBaseOperations() );
         assertEquals( expected, actual );
     }
 
@@ -169,7 +169,7 @@ public class ReverseDeleteTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -182,7 +182,7 @@ public class ReverseDeleteTestCase
         expected.addEdge( d, new BaseLabeledWeightedEdge<Double>( "d <-> e",
4D ), e );
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual =
-                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeight() );
+                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeightBaseOperations() );
         assertEquals( expected, actual );
     }
 
@@ -222,7 +222,7 @@ public class ReverseDeleteTestCase
         // expected
 
         MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double> expected =
-            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeight() );
+            new MutableSpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>,
Double>( new DoubleWeightBaseOperations() );
 
         for ( BaseLabeledVertex vertex : input.getVertices() )
         {
@@ -236,7 +236,7 @@ public class ReverseDeleteTestCase
         expected.addEdge( f, new BaseLabeledWeightedEdge<Double>( "f <-> d",
4D ), d );
 
         SpanningTree<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double>
actual =
-                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeight() );
+                        minimumSpanningTree( input ).applyingReverseDeleteAlgorithm( new
DoubleWeightBaseOperations() );
         assertEquals( expected, actual );
     }
 



Mime
View raw message