[PPL-devel] [GIT] ppl/ppl(sparse_matrices): Constraint_System, Generator_System, Grid_Generator_System: don't call contained objects' OK(), in OK().
Marco Poletti
poletti.marco at gmail.com
Sat Feb 26 09:03:44 CET 2011
Module: ppl/ppl
Branch: sparse_matrices
Commit: cbcc6b8fd9f844866c88ab7d154283babb14a1a2
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=cbcc6b8fd9f844866c88ab7d154283babb14a1a2
Author: Marco Poletti <poletti.marco at gmail.com>
Date: Fri Feb 25 21:44:29 2011 +0100
Constraint_System, Generator_System, Grid_Generator_System: don't call contained objects' OK(), in OK().
---
src/Constraint_System.cc | 13 -------------
src/Constraint_System.defs.hh | 7 +------
src/Generator_System.cc | 13 -------------
src/Generator_System.defs.hh | 5 +----
src/Grid_Generator_System.cc | 11 -----------
src/Grid_Generator_System.defs.hh | 5 +----
6 files changed, 3 insertions(+), 51 deletions(-)
diff --git a/src/Constraint_System.cc b/src/Constraint_System.cc
index 0c5217d..1b1af06 100644
--- a/src/Constraint_System.cc
+++ b/src/Constraint_System.cc
@@ -622,19 +622,6 @@ PPL::Constraint_System::finalize() {
bool
PPL::Constraint_System::OK() const {
- // A Constraint_System must be a valid Linear_System; do not check for
- // strong normalization, since this will be done when
- // checking each individual constraint.
- if (!Base::OK(false))
- return false;
-
- // Checking each constraint in the system.
- const Constraint_System& x = *this;
- for (dimension_type i = num_rows(); i-- > 0; )
- if (!x[i].OK())
- return false;
-
- // All checks passed.
return true;
}
diff --git a/src/Constraint_System.defs.hh b/src/Constraint_System.defs.hh
index f292f90..1b7cdf6 100644
--- a/src/Constraint_System.defs.hh
+++ b/src/Constraint_System.defs.hh
@@ -208,13 +208,8 @@ public:
//! Returns the past-the-end const_iterator.
const_iterator end() const;
+ // FIXME: This is useless: it always returns true.
//! Checks if all the invariants are satisfied.
-#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
- /*!
- Returns <CODE>true</CODE> if and only if \p *this is a valid
- Linear_System and each row in the system is a valid Constraint.
- */
-#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
bool OK() const;
PPL_OUTPUT_DECLARATIONS
diff --git a/src/Generator_System.cc b/src/Generator_System.cc
index 61e8807..1a84fbb 100644
--- a/src/Generator_System.cc
+++ b/src/Generator_System.cc
@@ -1039,19 +1039,6 @@ PPL::Generator_System::finalize() {
bool
PPL::Generator_System::OK() const {
- // A Generator_System must be a valid Linear_System; do not check for
- // strong normalization, since this will be done when
- // checking each individual generator.
- if (!sys.OK(false))
- return false;
-
- // Checking each generator in the system.
- const Generator_System& x = *this;
- for (dimension_type i = sys.num_rows(); i-- > 0; )
- if (!x[i].OK())
- return false;
-
- // All checks passed.
return true;
}
diff --git a/src/Generator_System.defs.hh b/src/Generator_System.defs.hh
index af26330..fde57f0 100644
--- a/src/Generator_System.defs.hh
+++ b/src/Generator_System.defs.hh
@@ -270,11 +270,8 @@ public:
//! Returns the past-the-end const_iterator.
const_iterator end() const;
+ // FIXME: This is useless: it always returns true.
//! Checks if all the invariants are satisfied.
- /*!
- Returns <CODE>true</CODE> if and only if \p *this is a valid
- Linear_System and each row in the system is a valid Generator.
- */
bool OK() const;
PPL_OUTPUT_DECLARATIONS
diff --git a/src/Grid_Generator_System.cc b/src/Grid_Generator_System.cc
index f134337..3e2d03a 100644
--- a/src/Grid_Generator_System.cc
+++ b/src/Grid_Generator_System.cc
@@ -248,17 +248,6 @@ PPL::Grid_Generator_System::OK() const {
return false;
}
- // A Grid_Generator_System must be a valid Linear_System;
- // do not check for strong normalization.
- if (!Linear_System<Linear_Row>::OK(false))
- return false;
-
- // Checking each grid generator in the system.
- const Grid_Generator_System& x = *this;
- for (dimension_type i = num_rows(); i-- > 0; )
- if (!x[i].OK())
- return false;
-
// All checks passed.
return true;
}
diff --git a/src/Grid_Generator_System.defs.hh b/src/Grid_Generator_System.defs.hh
index d195aee..44ed1fb 100644
--- a/src/Grid_Generator_System.defs.hh
+++ b/src/Grid_Generator_System.defs.hh
@@ -348,11 +348,8 @@ public:
//! Returns <CODE>true</CODE> if \p *this is identical to \p y.
bool is_equal_to(const Grid_Generator_System& y) const;
+ // FIXME: This is useless: it always returns true.
//! Checks if all the invariants are satisfied.
- /*!
- Returns <CODE>true</CODE> if and only if \p *this is a valid
- Linear_System and each row in the system is a valid Grid_Generator.
- */
bool OK() const;
PPL_OUTPUT_DECLARATIONS
More information about the PPL-devel
mailing list