Compare commits

...

7 Commits

Author SHA1 Message Date
Gael Guennebaud
56f9b810ab bump to 3.2 2013-07-23 18:48:35 -07:00
Gael Guennebaud
12815309a6 Added tag 3.2-rc2 for changeset 207747a518 2013-07-19 16:59:01 +02:00
Gael Guennebaud
207747a518 Bump to 3.2-rc2 2013-07-19 16:58:51 +02:00
Gael Guennebaud
5ecfdf2c00 Fix ICE with ICC 11
(transplanted from 660b905e12
)
2013-07-19 11:46:54 +02:00
Gael Guennebaud
e788869cf5 Previous isFinite->hasNonFinite change was broken. After discussion let's rename it to allFinite
(transplanted from 4f0bd557a4
)
2013-07-18 11:27:04 +02:00
Gael Guennebaud
9df04bcede Rename isFinite to hasNonFinite to avoid future naming collisions.
(transplanted from 6fab4012a3
)
2013-07-17 21:13:45 +02:00
Gael Guennebaud
c31606c88a Added tag 3.2-rc1 for changeset 2872d964f4 2013-07-17 10:00:51 +02:00
6 changed files with 17 additions and 17 deletions

View File

@@ -131,7 +131,7 @@ inline typename DenseBase<Derived>::Index DenseBase<Derived>::count() const
/** \returns true is \c *this contains at least one Not A Number (NaN). /** \returns true is \c *this contains at least one Not A Number (NaN).
* *
* \sa isFinite() * \sa allFinite()
*/ */
template<typename Derived> template<typename Derived>
inline bool DenseBase<Derived>::hasNaN() const inline bool DenseBase<Derived>::hasNaN() const
@@ -144,7 +144,7 @@ inline bool DenseBase<Derived>::hasNaN() const
* \sa hasNaN() * \sa hasNaN()
*/ */
template<typename Derived> template<typename Derived>
inline bool DenseBase<Derived>::isFinite() const inline bool DenseBase<Derived>::allFinite() const
{ {
return !((derived()-derived()).hasNaN()); return !((derived()-derived()).hasNaN());
} }

View File

@@ -348,7 +348,7 @@ template<typename Derived> class DenseBase
bool isOnes(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const; bool isOnes(const RealScalar& prec = NumTraits<Scalar>::dummy_precision()) const;
inline bool hasNaN() const; inline bool hasNaN() const;
inline bool isFinite() const; inline bool allFinite() const;
inline Derived& operator*=(const Scalar& other); inline Derived& operator*=(const Scalar& other);
inline Derived& operator/=(const Scalar& other); inline Derived& operator/=(const Scalar& other);

View File

@@ -12,8 +12,8 @@
#define EIGEN_MACROS_H #define EIGEN_MACROS_H
#define EIGEN_WORLD_VERSION 3 #define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 1 #define EIGEN_MAJOR_VERSION 2
#define EIGEN_MINOR_VERSION 92 #define EIGEN_MINOR_VERSION 0
#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \ #define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
(EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \ (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \

View File

@@ -105,7 +105,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
>::type AdjointReturnType; >::type AdjointReturnType;
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject; typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, Index> PlainObject;
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN

View File

@@ -75,22 +75,22 @@ template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView
* Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product. * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.
*/ */
template<typename OtherDerived> template<typename OtherDerived>
SparseSparseProduct<SparseMatrix<Scalar, ((internal::traits<OtherDerived>::Flags&RowMajorBit) ? RowMajor : ColMajor),Index>, OtherDerived> SparseSparseProduct<typename OtherDerived::PlainObject, OtherDerived>
operator*(const SparseMatrixBase<OtherDerived>& rhs) const operator*(const SparseMatrixBase<OtherDerived>& rhs) const
{ {
return SparseSparseProduct<SparseMatrix<Scalar, (internal::traits<OtherDerived>::Flags&RowMajorBit) ? RowMajor : ColMajor, Index>, OtherDerived>(*this, rhs.derived()); return SparseSparseProduct<typename OtherDerived::PlainObject, OtherDerived>(*this, rhs.derived());
} }
/** \returns an expression of the matrix product between a sparse matrix \a lhs and a sparse self-adjoint matrix \a rhs. /** \returns an expression of the matrix product between a sparse matrix \a lhs and a sparse self-adjoint matrix \a rhs.
* *
* Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. * Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product.
* Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product. * Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.
*/ */
template<typename OtherDerived> friend template<typename OtherDerived> friend
SparseSparseProduct<OtherDerived, SparseMatrix<Scalar, ((internal::traits<OtherDerived>::Flags&RowMajorBit) ? RowMajor : ColMajor),Index> > SparseSparseProduct<OtherDerived, typename OtherDerived::PlainObject >
operator*(const SparseMatrixBase<OtherDerived>& lhs, const SparseSelfAdjointView& rhs) operator*(const SparseMatrixBase<OtherDerived>& lhs, const SparseSelfAdjointView& rhs)
{ {
return SparseSparseProduct< OtherDerived, SparseMatrix<Scalar, (internal::traits<OtherDerived>::Flags&RowMajorBit) ? RowMajor : ColMajor, Index> >(lhs.derived(), rhs.derived()); return SparseSparseProduct<OtherDerived, typename OtherDerived::PlainObject>(lhs.derived(), rhs);
} }
/** Efficient sparse self-adjoint matrix times dense vector/matrix product */ /** Efficient sparse self-adjoint matrix times dense vector/matrix product */

View File

@@ -33,7 +33,7 @@ template<typename Scalar> void special_numbers()
mboth = mnan + minf; mboth = mnan + minf;
VERIFY(!m1.hasNaN()); VERIFY(!m1.hasNaN());
VERIFY(m1.isFinite()); VERIFY(m1.allFinite());
VERIFY(mnan.hasNaN()); VERIFY(mnan.hasNaN());
VERIFY((s1*mnan).hasNaN()); VERIFY((s1*mnan).hasNaN());
@@ -42,11 +42,11 @@ template<typename Scalar> void special_numbers()
VERIFY(mboth.hasNaN()); VERIFY(mboth.hasNaN());
VERIFY(mboth.array().hasNaN()); VERIFY(mboth.array().hasNaN());
VERIFY(!mnan.isFinite()); VERIFY(!mnan.allFinite());
VERIFY(!minf.isFinite()); VERIFY(!minf.allFinite());
VERIFY(!(minf-mboth).isFinite()); VERIFY(!(minf-mboth).allFinite());
VERIFY(!mboth.isFinite()); VERIFY(!mboth.allFinite());
VERIFY(!mboth.array().isFinite()); VERIFY(!mboth.array().allFinite());
} }
void test_special_numbers() void test_special_numbers()