[PPL-devel] [GIT] ppl/ppl(sparse_matrices): CO_Tree: fix bug in rebalance() introduced by commit 554399.
Marco Poletti
poletti.marco at gmail.com
Fri May 7 14:02:11 CEST 2010
Module: ppl/ppl
Branch: sparse_matrices
Commit: 64b25d958916f544c488b91bae1b6c356e3bdc2a
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=64b25d958916f544c488b91bae1b6c356e3bdc2a
Author: Marco Poletti <poletti.marco at gmail.com>
Date: Fri May 7 14:01:15 2010 +0200
CO_Tree: fix bug in rebalance() introduced by commit 554399.
---
src/CO_Tree.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/CO_Tree.cc b/src/CO_Tree.cc
index 1f4c01e..b749767 100644
--- a/src/CO_Tree.cc
+++ b/src/CO_Tree.cc
@@ -503,7 +503,7 @@ PPL::CO_Tree::rebalance(inorder_iterator& itr, dimension_type key,
}
#endif
dimension_type itr_depth_minus_1 = itr.depth() - 1;
- dimension_type height = max_depth + itr_depth_minus_1;
+ dimension_type height = max_depth - itr_depth_minus_1;
dimension_type subtree_size;
const bool deleting = itr->first == unused_index;
PPL_ASSERT(deleting || key != unused_index);
More information about the PPL-devel
mailing list