[GIT] ppl/ppl(pip): Proper update of internal state of PIP_Problem object.

Module: ppl/ppl Branch: pip Commit: 842215c913d84316b2a73e0a50dd3312c2a04536 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=842215c913d84...
Author: François Galea francois.galea@uvsq.fr Date: Tue Sep 29 16:21:25 2009 +0200
Proper update of internal state of PIP_Problem object.
---
src/PIP_Problem.cc | 6 ++++++ src/PIP_Tree.cc | 1 - 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc index ced38e3..a772079 100644 --- a/src/PIP_Problem.cc +++ b/src/PIP_Problem.cc @@ -78,11 +78,17 @@ PPL::PIP_Problem::solve() const {
if (current_solution == 0) x.current_solution = new PIP_Solution_Node(&x); + if (input_cs.empty()) { + // no constraints: solution = {0} + return OPTIMIZED_PIP_PROBLEM; + }
x.current_solution->update_tableau(external_space_dim, first_pending_constraint, input_cs, parameters); + x.internal_space_dim = external_space_dim; + x.first_pending_constraint = input_cs.size();
Matrix initial_context(0, parameters.size()+1); return_value = x.current_solution->solve(x.current_solution, diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc index 3853e72..b16c902 100644 --- a/src/PIP_Tree.cc +++ b/src/PIP_Tree.cc @@ -619,7 +619,6 @@ PIP_Solution_Node::update_tableau(dimension_type external_space_dim, tableau.t.add_row(param); sign.push_back(row_sign(param)); } - // FIXME: decide emptiness detection (and node removal) }
void
participants (1)
-
François Galea