
Module: ppl/ppl Branch: sparse_matrices Commit: 64b25d958916f544c488b91bae1b6c356e3bdc2a URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=64b25d958916f...
Author: Marco Poletti poletti.marco@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);