[PPL-devel] [GIT] ppl/ppl(pip): Initial draft fo rinterface improved.

Enea Zaffanella zaffanella at cs.unipr.it
Sun Jun 14 21:51:46 CEST 2009


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

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Sun Jun 14 21:49:51 2009 +0200

Initial draft fo rinterface improved.
Removed control parameters; removed UNBOUND status; renamed a few methods;
let PIP_Tree be an alias for a pointer to a _const_ PIP_Tree_Node.

---

 src/PIP_Problem.defs.hh  |   31 ++++---------------------------
 src/PIP_Problem.types.hh |    2 --
 src/PIP_Tree.defs.hh     |    2 +-
 3 files changed, 5 insertions(+), 30 deletions(-)

diff --git a/src/PIP_Problem.defs.hh b/src/PIP_Problem.defs.hh
index ecd34f2..b7cfbbc 100644
--- a/src/PIP_Problem.defs.hh
+++ b/src/PIP_Problem.defs.hh
@@ -265,20 +265,20 @@ public:
   */
   PIP_Problem_Status solve() const;
 
-  //! Returns a feasible point for \p *this, if it exists.
+  //! Returns a feasible solution for \p *this, if it exists.
   /*!
     \exception std::domain_error
     Thrown if the PIP problem is not satisfiable.
   */
-  const Generator& feasible_point() const;
+  PIP_Tree solution() const;
 
-  //! Returns an optimal point for \p *this, if it exists.
+  //! Returns an optimizing solution for \p *this, if it exists.
   /*!
     \exception std::domain_error
     Thrown if \p *this doesn't not have an optimizing point, i.e.,
     if the PIP problem is unbounded or not satisfiable.
   */
-  const Generator& optimizing_point() const;
+  PIP_Tree optimizing_solution() const;
 
   //! Checks if all the invariants are satisfied.
   bool OK() const;
@@ -300,29 +300,6 @@ public:
 
   //! Swaps \p *this with \p y.
   void swap(PIP_Problem& y);
-
-  //! Names of PIP problems' control parameters.
-  enum Control_Parameter_Name {
-    //! The pricing rule.
-    PRICING
-  };
-
-  //! Possible values for PIP problem's control parameters.
-  enum Control_Parameter_Value {
-    //! Steepest edge pricing method, using floating points (default).
-    PRICING_STEEPEST_EDGE_FLOAT,
-    //! Steepest edge pricing method, using Coefficient.
-    PRICING_STEEPEST_EDGE_EXACT,
-    //! Textbook pricing method.
-    PRICING_TEXTBOOK
-  };
-
-  //! Returns the value of the control parameter \p name.
-  Control_Parameter_Value
-  get_control_parameter(Control_Parameter_Name name) const;
-
-  //! Sets control parameter \p value.
-  void set_control_parameter(Control_Parameter_Value value);
 };
 
 namespace std {
diff --git a/src/PIP_Problem.types.hh b/src/PIP_Problem.types.hh
index ac32824..c6033bb 100644
--- a/src/PIP_Problem.types.hh
+++ b/src/PIP_Problem.types.hh
@@ -19,8 +19,6 @@ namespace Parma_Polyhedra_Library {
 enum PIP_Problem_Status {
   //! The problem is unfeasible.
   UNFEASIBLE_PIP_PROBLEM,
-  //! The problem is unbounded.
-  UNBOUNDED_PIP_PROBLEM,
   //! The problem has an optimal solution.
   OPTIMIZED_PIP_PROBLEM
 };
diff --git a/src/PIP_Tree.defs.hh b/src/PIP_Tree.defs.hh
index b74d0ea..c13fd80 100644
--- a/src/PIP_Tree.defs.hh
+++ b/src/PIP_Tree.defs.hh
@@ -89,7 +89,7 @@ private:
   PIP_Tree_Node* true_child;
 };
 
-typedef PIP_Tree_Node* PIP_Tree;
+typedef const PIP_Tree_Node* PIP_Tree;
 
 } // namespace Parma_Polyhedra_Library
 




More information about the PPL-devel mailing list