1.1 --- a/lemon/binomial_heap.h Wed Mar 17 12:35:52 2010 +0100
1.2 +++ b/lemon/binomial_heap.h Sat Mar 06 14:35:12 2010 +0000
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2009
1.8 + * Copyright (C) 2003-2010
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -258,7 +258,7 @@
1.13 int i=_iim[item];
1.14 int p=_data[i].parent;
1.15 _data[i].prio=value;
1.16 -
1.17 +
1.18 while( p!=-1 && _comp(value, _data[p].prio) ) {
1.19 _data[i].name=_data[p].name;
1.20 _data[i].prio=_data[p].prio;
1.21 @@ -322,7 +322,7 @@
1.22 }
1.23
1.24 private:
1.25 -
1.26 +
1.27 // Find the minimum of the roots
1.28 int findMin() {
1.29 if( _head!=-1 ) {
1.30 @@ -350,7 +350,7 @@
1.31 interleave(a);
1.32 }
1.33 if( _data[_head].right_neighbor==-1 ) return;
1.34 -
1.35 +
1.36 int x=_head;
1.37 int x_prev=-1, x_next=_data[x].right_neighbor;
1.38 while( x_next!=-1 ) {
1.39 @@ -384,7 +384,7 @@
1.40 int p=_head, q=a;
1.41 int curr=_data.size();
1.42 _data.push_back(Store());
1.43 -
1.44 +
1.45 while( p!=-1 || q!=-1 ) {
1.46 if( q==-1 || ( p!=-1 && _data[p].degree<_data[q].degree ) ) {
1.47 _data[curr].right_neighbor=p;
1.48 @@ -397,7 +397,7 @@
1.49 q=_data[q].right_neighbor;
1.50 }
1.51 }
1.52 -
1.53 +
1.54 _head=_data.back().right_neighbor;
1.55 _data.pop_back();
1.56 }