[PPL-devel] [GIT] ppl/ppl(sparse_matrices): PIP_Solution_Node: fix regression in generate_cut() introduced by commit 65bee8.

Marco Poletti poletti.marco at gmail.com
Tue Mar 16 13:48:07 CET 2010


Module: ppl/ppl
Branch: sparse_matrices
Commit: 080fe74341d5bd372763bf2f7af0271a81aa5a07
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=080fe74341d5bd372763bf2f7af0271a81aa5a07

Author: Marco Poletti <poletti.marco at gmail.com>
Date:   Mon Mar 15 23:32:43 2010 +0100

PIP_Solution_Node: fix regression in generate_cut() introduced by commit 65bee8.

---

 src/PIP_Tree.cc |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index d977181..469386f 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -3184,9 +3184,7 @@ PIP_Solution_Node::generate_cut(const dimension_type index,
         Variables_Set::const_iterator p_j = parameters.begin();
         matrix_const_row_const_iterator j = row_t.lower_bound(1);
         matrix_const_row_const_iterator j_end = row_t.end();
-        dimension_type last_index;
-        if (j!=j_end)
-          last_index = (*j).first;
+        dimension_type last_index = 1;
         for ( ; j!=j_end; ++j) {
           mod_assign(mod, (*j).second, den);
           if (mod != 0) {




More information about the PPL-devel mailing list