[PPL-devel] [GIT] ppl/ppl(pip): Minor coding style improvements.

Enea Zaffanella zaffanella at cs.unipr.it
Thu Sep 3 14:35:45 CEST 2009


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

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Thu Sep  3 14:28:12 2009 +0200

Minor coding style improvements.

---

 src/PIP_Problem.cc         |    3 +--
 src/PIP_Problem.defs.hh    |   21 +++++++++++----------
 src/PIP_Problem.inlines.hh |   23 ++++++++++++++---------
 3 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc
index 7fbb239..2a1089d 100644
--- a/src/PIP_Problem.cc
+++ b/src/PIP_Problem.cc
@@ -47,8 +47,7 @@ PPL::PIP_Problem::PIP_Problem(dimension_type dim)
     parameters() {
   // Check for space dimension overflow.
   if (dim > max_space_dimension())
-    throw std::length_error("PPL::PIP_Problem:: PIP_Problem(dim, first, "
-                            "last, p_vars):\n"
+    throw std::length_error("PPL::PIP_Problem:: PIP_Problem(dim):\n"
                             "dim exceeds the maximum allowed"
                             "space dimension.");
   PPL_ASSERT(OK());
diff --git a/src/PIP_Problem.defs.hh b/src/PIP_Problem.defs.hh
index a9b666a..5a0ce38 100644
--- a/src/PIP_Problem.defs.hh
+++ b/src/PIP_Problem.defs.hh
@@ -287,7 +287,7 @@ private:
   dimension_type internal_space_dim;
 
   //! A rational matrix, with a common nenominator
-  class Rational_Matrix: public Matrix {
+  class Rational_Matrix : public Matrix {
   public:
     //! Builds an empty matrix.
     /*!
@@ -330,15 +330,16 @@ private:
     Coefficient denominator;
   };
 
-  //! The parametric simplex tableau
-  /*!
-    Consists in two rational matrices, represented as an integer tableau 
-    and a common denominator. The \p s matrix is the matrix of simplex
-    coefficients, and the \p t matrix is the matrix of parameter coefficients.
-  */
-  struct {
-    Rational_Matrix s, t;
-  } tableau;
+  //! The type for parametric simplex tableau.
+  struct Tableau {
+    //! The matrix of simplex coefficients.
+    Rational_Matrix s;
+    //! The matrix of parameter coefficients.
+    Rational_Matrix t;
+  };
+
+  //! The parametric simplex tableau.
+  Tableau tableau;
 
   //! An enumerated type describing the internal status of the PIP problem.
   enum Status {
diff --git a/src/PIP_Problem.inlines.hh b/src/PIP_Problem.inlines.hh
index 4064d0a..4dcb55b 100644
--- a/src/PIP_Problem.inlines.hh
+++ b/src/PIP_Problem.inlines.hh
@@ -25,23 +25,28 @@ site: http://www.cs.unipr.it/ppl/ . */
 
 namespace Parma_Polyhedra_Library {
 
-inline PIP_Problem::Rational_Matrix::Rational_Matrix():
-    Matrix(), denominator(1) {
+inline
+PIP_Problem::Rational_Matrix::Rational_Matrix()
+  : Matrix(),
+    denominator(1) {
 }
 
-inline PIP_Problem::Rational_Matrix::Rational_Matrix(
-    dimension_type n_rows, dimension_type n_columns, Row::Flags row_flags):
-    Matrix(n_rows, n_columns, row_flags),
+inline
+PIP_Problem::Rational_Matrix::Rational_Matrix(dimension_type n_rows,
+                                              dimension_type n_columns,
+                                              Row::Flags row_flags)
+  : Matrix(n_rows, n_columns, row_flags),
     denominator(1) {
 }
 
-inline PIP_Problem::Rational_Matrix::Rational_Matrix(
-    const Rational_Matrix& y):
-    Matrix(y),
+inline
+PIP_Problem::Rational_Matrix::Rational_Matrix(const Rational_Matrix& y)
+  : Matrix(y),
     denominator(1) {
 }
 
-inline bool PIP_Problem::Rational_Matrix::is_integer() {
+inline bool
+PIP_Problem::Rational_Matrix::is_integer() {
   return denominator == 1;
 }
 




More information about the PPL-devel mailing list