diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-12-04 23:17:14 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-12-04 23:17:14 +0100 |
commit | 8e05f9cfa1538d76a9d3e01e08ba565bd581806a (patch) | |
tree | e3ba56b1c37c00ce1da70277e8ef2a86a48c6173 /Eigen/src/Array/BooleanRedux.h | |
parent | 80ebeae48d7b56500d9ebc8abd2789061af145e1 (diff) |
add a DenseBase class for MAtrixBase and ArrayBase and more code factorisation
Diffstat (limited to 'Eigen/src/Array/BooleanRedux.h')
-rw-r--r-- | Eigen/src/Array/BooleanRedux.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Eigen/src/Array/BooleanRedux.h b/Eigen/src/Array/BooleanRedux.h index ab6e06d56..9c6985a29 100644 --- a/Eigen/src/Array/BooleanRedux.h +++ b/Eigen/src/Array/BooleanRedux.h @@ -84,10 +84,10 @@ struct ei_any_unroller<Derived, Dynamic> * Example: \include MatrixBase_all.cpp * Output: \verbinclude MatrixBase_all.out * - * \sa MatrixBase::any(), Cwise::operator<() + * \sa any(), Cwise::operator<() */ template<typename Derived> -inline bool MatrixBase<Derived>::all() const +inline bool DenseBase<Derived>::all() const { const bool unroll = SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT; @@ -108,10 +108,10 @@ inline bool MatrixBase<Derived>::all() const * * \returns true if at least one coefficient is true * - * \sa MatrixBase::all() + * \sa all() */ template<typename Derived> -inline bool MatrixBase<Derived>::any() const +inline bool DenseBase<Derived>::any() const { const bool unroll = SizeAtCompileTime * (CoeffReadCost + NumTraits<Scalar>::AddCost) <= EIGEN_UNROLLING_LIMIT; @@ -132,12 +132,12 @@ inline bool MatrixBase<Derived>::any() const * * \returns the number of coefficients which evaluate to true * - * \sa MatrixBase::all(), MatrixBase::any() + * \sa all(), any() */ template<typename Derived> -inline int MatrixBase<Derived>::count() const +inline int DenseBase<Derived>::count() const { - return this->cast<bool>().cast<int>().sum(); + return derived().template cast<bool>().template cast<int>().sum(); } #endif // EIGEN_ALLANDANY_H |