meagre outcome for so much time spent!

* fix inverse() bug discovered by Gael's test
* fix warnings introduced by the new Diagonal stuff
* update Doxyfile to v1.5.6
This commit is contained in:
Benoit Jacob 2008-06-01 03:36:49 +00:00
parent d5cbb1d002
commit dc5fd8dfff
5 changed files with 1239 additions and 53 deletions

View File

@ -42,15 +42,15 @@ template<typename CoeffsVectorType>
struct ei_traits<DiagonalMatrix<CoeffsVectorType> >
{
typedef typename CoeffsVectorType::Scalar Scalar;
typedef typename ei_nested<CoeffsVectorType>::type CoeffsVectorTypeTypeNested;
typedef typename ei_unref<CoeffsVectorTypeTypeNested>::type _CoeffsVectorTypeTypeNested;
typedef typename ei_nested<CoeffsVectorType>::type CoeffsVectorTypeNested;
typedef typename ei_unref<CoeffsVectorTypeNested>::type _CoeffsVectorTypeNested;
enum {
RowsAtCompileTime = CoeffsVectorType::SizeAtCompileTime,
ColsAtCompileTime = CoeffsVectorType::SizeAtCompileTime,
MaxRowsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime,
MaxColsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime,
Flags = _CoeffsVectorTypeTypeNested::Flags & HereditaryBits | Diagonal,
CoeffReadCost = _CoeffsVectorTypeTypeNested::CoeffReadCost
Flags = (_CoeffsVectorTypeNested::Flags & HereditaryBits) | Diagonal,
CoeffReadCost = _CoeffsVectorTypeNested::CoeffReadCost
};
};

View File

@ -267,7 +267,7 @@ class Matrix : public MatrixBase<Matrix<_Scalar, _Rows, _Cols, _Flags, _MaxRows,
else
{
ei_assert(x > 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == x)
&& y > 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == y));
&& y > 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == y));
}
}
/** constructs an initialized 2D vector with given coefficients */

View File

@ -147,7 +147,7 @@ template<typename Lhs, typename Rhs> struct ei_product_eval_mode
enum{ value = Lhs::MaxRowsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
&& Rhs::MaxColsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
&& Lhs::MaxColsAtCompileTime >= EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
&& Rhs::Flags&Diagonal!=Diagonal
&& (Rhs::Flags&Diagonal)!=Diagonal
? CacheFriendlyProduct : NormalProduct };
};

View File

@ -60,9 +60,9 @@ template<typename MatrixType, bool CheckExistence> class Inverse : ei_no_assignm
EIGEN_GENERIC_PUBLIC_INTERFACE(Inverse)
Inverse(const MatrixType& matrix)
: m_exists(true),
m_inverse(MatrixType::identity(matrix.rows(), matrix.cols()))
: m_inverse(MatrixType::identity(matrix.rows(), matrix.cols()))
{
if(CheckExistence) m_exists = true;
ei_assert(matrix.rows() == matrix.cols());
_compute(matrix);
}
@ -269,7 +269,7 @@ template<typename Derived>
const Inverse<typename ei_eval<Derived>::type, true>
MatrixBase<Derived>::inverse() const
{
return Inverse<typename ei_eval<Derived>::type, true>(derived());
return Inverse<typename ei_eval<Derived>::type, true>(eval());
}
/** \return the matrix inverse of \c *this, which is assumed to exist.
@ -283,7 +283,7 @@ template<typename Derived>
const Inverse<typename ei_eval<Derived>::type, false>
MatrixBase<Derived>::quickInverse() const
{
return Inverse<typename ei_eval<Derived>::type, false>(derived());
return Inverse<typename ei_eval<Derived>::type, false>(eval());
}
#endif // EIGEN_INVERSE_H

File diff suppressed because it is too large Load Diff