commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcospera...@apache.org
Subject svn commit: r1360116 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
Date Wed, 11 Jul 2012 10:44:23 GMT
Author: marcosperanza
Date: Wed Jul 11 10:44:22 2012
New Revision: 1360116

URL: http://svn.apache.org/viewvc?rev=1360116&view=rev
Log:
dropped duplicated code

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java?rev=1360116&r1=1360115&r2=1360116&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
Wed Jul 11 10:44:22 2012
@@ -369,11 +369,7 @@ public final class FibonacciHeap<E>
             x.getLeft().setRight( x.getRight() );
             x.getRight().setLeft( x.getLeft() );
 
-            // 4  add x to the root list of H
-            x.setLeft( minimumNode );
-            x.setRight( minimumNode.getRight() );
-            minimumNode.setRight( x );
-            x.getRight().setLeft( x );
+            moveToRoot( x );
 
             // 5  p[x] <- NIL
             x.setParent( null );



Mime
View raw message