[PPL-devel] [GIT] ppl/ppl(pip): Implemeted missing methods.

François Galea francois.galea at uvsq.fr
Thu Oct 8 15:51:39 CEST 2009


Module: ppl/ppl
Branch: pip
Commit: 5108da19b0b8c478b34865ee5f38b65c71a82874
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5108da19b0b8c478b34865ee5f38b65c71a82874

Author: François Galea <francois.galea at uvsq.fr>
Date:   Thu Oct  8 15:51:42 2009 +0200

Implemeted missing methods.

---

 src/PIP_Problem.cc |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc
index d8bdd2c..cb1b36a 100644
--- a/src/PIP_Problem.cc
+++ b/src/PIP_Problem.cc
@@ -295,6 +295,22 @@ PPL::PIP_Problem::ascii_load(std::istream& s) {
 }
 
 void
+PPL::PIP_Problem::clear() {
+  external_space_dim = 0;
+  internal_space_dim = 0;
+  status = PARTIALLY_SATISFIABLE;
+  if (current_solution != 0) {
+    delete current_solution;
+    current_solution = 0;
+  }
+  initialized = false;
+  input_cs.clear();
+  first_pending_constraint = 0;
+  parameters.clear();
+  initial_context.clear();  
+}
+
+void
 PPL::PIP_Problem
 ::add_space_dimensions_and_embed(const dimension_type m_pip_vars,
                                  const dimension_type m_pip_params) {
@@ -351,3 +367,7 @@ PPL::PIP_Problem::add_constraints(const Constraint_System &cs) {
     add_constraint(*c);
 }
 
+bool
+PPL::PIP_Problem::is_satisfiable() const {
+  return status == OPTIMIZED;
+}




More information about the PPL-devel mailing list