Update of /cvsroot/boost/boost/boost/pending
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11590
Modified Files:
fibonacci_heap.hpp
Log Message:
a few more bug fixes
Index: fibonacci_heap.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/pending/fibonacci_heap.hpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- fibonacci_heap.hpp 15 Mar 2007 14:12:41 -0000 1.14
+++ fibonacci_heap.hpp 18 Mar 2007 16:21:46 -0000 1.15
@@ -120,12 +120,14 @@
new_roots[r] = nil();
if (_compare(_key[u], _key[v])) {
_degree[v] = r;
+ _mark[v] = false;
std::swap(u, v);
}
make_child(u, v, r);
++r;
}
_degree[v] = r;
+ _mark[v] = false;
}
// 40
void make_child(size_type u, size_type v, size_type r) {
@@ -178,7 +180,7 @@
if (p == nil()) {
if (_compare(d, _key[_root]))
_root = v;
- } else if (_compare(d, _key[_root]))
+ } else if (_compare(d, _key[p]))
while (1) {
size_type r = _degree[p];
if (r >= 2)
@@ -191,6 +193,7 @@
}
if (_mark[p] == false) {
_mark[p] = true;
+ --_degree[p];
break;
} else
--_degree[p];
@@ -237,7 +240,7 @@
void print_recur(size_type x, std::ostream& os) {
if (x != nil()) {
os << x;
- if (_child[x] != nil()) {
+ if (_degree[x] > 0) {
os << "(";
size_type i = _child[x];
do {
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs