commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1357200 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/collections/FibonacciHeap.java
Date Wed, 04 Jul 2012 09:54:02 GMT
Author: simonetripodi
Date: Wed Jul  4 09:54:01 2012
New Revision: 1357200

URL: http://svn.apache.org/viewvc?rev=1357200&view=rev
Log:
each time a FibonacciHeapNode is (un)marked, the markedNodes counter (de|in)creases

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=1357200&r1=1357199&r2=1357200&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  4 09:54:01 2012
@@ -547,6 +547,7 @@ public final class FibonacciHeap<E>
 
         // 3  mark[y] <- FALSE
         y.setMarked( false );
+        markedNodes++;
     }
 
     /**
@@ -576,6 +577,7 @@ public final class FibonacciHeap<E>
 
         // mark[x] <- FALSE
         x.setMarked( false );
+        markedNodes--;
     }
 
     /**
@@ -604,6 +606,7 @@ public final class FibonacciHeap<E>
             {
                 // then mark[y]  TRUE
                 y.setMarked( true );
+                markedNodes++;
             }
             else
             {



Mime
View raw message