mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-15 02:43:14 +08:00
* more MSVC warning fixes from Kenneth Riddile
* actually GCC 4.3.0 has a bug, "deprecated" placed at the end of a function prototype doesn't have any effect, moving them to the start of the function prototype makes it actually work! * finish porting the cholesky unit-test to the new LLT/LDLT, after the above fix revealed a deprecated warning
This commit is contained in:
parent
f34a4fa335
commit
84bb868f07
@ -58,7 +58,7 @@ template<typename MatrixType> class Cholesky
|
|||||||
inline bool isPositiveDefinite(void) const { return m_isPositiveDefinite; }
|
inline bool isPositiveDefinite(void) const { return m_isPositiveDefinite; }
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
typename MatrixBase<Derived>::PlainMatrixType_ColMajor solve(const MatrixBase<Derived> &b) const EIGEN_DEPRECATED;
|
EIGEN_DEPRECATED typename MatrixBase<Derived>::PlainMatrixType_ColMajor solve(const MatrixBase<Derived> &b) const;
|
||||||
|
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResDerived>
|
||||||
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
||||||
|
@ -55,7 +55,7 @@ template<typename MatrixType> class CholeskyWithoutSquareRoot
|
|||||||
inline bool isPositiveDefinite(void) const { return m_isPositiveDefinite; }
|
inline bool isPositiveDefinite(void) const { return m_isPositiveDefinite; }
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
typename Derived::Eval solve(const MatrixBase<Derived> &b) const EIGEN_DEPRECATED;
|
EIGEN_DEPRECATED typename Derived::Eval solve(const MatrixBase<Derived> &b) const;
|
||||||
|
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResDerived>
|
||||||
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
||||||
|
@ -495,7 +495,12 @@ template<typename Derived> class MatrixBase
|
|||||||
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
* Notice that in the case of a plain matrix or vector (not an expression) this function just returns
|
||||||
* a const reference, in order to avoid a useless copy.
|
* a const reference, in order to avoid a useless copy.
|
||||||
*/
|
*/
|
||||||
EIGEN_ALWAYS_INLINE const typename ei_eval<Derived>::type eval() const
|
#ifdef _MSC_VER
|
||||||
|
inline // MSVC 2008 can't force-inline this method and emits a warning, so do just 'inline'
|
||||||
|
#else
|
||||||
|
EIGEN_ALWAYS_INLINE
|
||||||
|
#endif
|
||||||
|
const typename ei_eval<Derived>::type eval() const
|
||||||
{
|
{
|
||||||
return typename ei_eval<Derived>::type(derived());
|
return typename ei_eval<Derived>::type(derived());
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning( push )
|
#pragma warning( push )
|
||||||
#pragma warning( disable : 4181 4244 4127 )
|
#pragma warning( disable : 4181 4244 4127 4211 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // EIGEN_DISABLEMSVCWARNINGS_H
|
#endif // EIGEN_DISABLEMSVCWARNINGS_H
|
@ -63,9 +63,9 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
|
|||||||
convert<VectorType>(vecB, gVecX);
|
convert<VectorType>(vecB, gVecX);
|
||||||
Gsl::cholesky(gMatA);
|
Gsl::cholesky(gMatA);
|
||||||
Gsl::cholesky_solve(gMatA, gVecB, gVecX);
|
Gsl::cholesky_solve(gMatA, gVecB, gVecX);
|
||||||
VectorType vecX, _vecX, _vecB;
|
VectorType vecX(rows), _vecX, _vecB;
|
||||||
convert(gVecX, _vecX);
|
convert(gVecX, _vecX);
|
||||||
vecX.set( symm.cholesky().solve(vecB) );
|
symm.llt().solve(vecB, &vecX);
|
||||||
Gsl::prod(gSymm, gVecX, gVecB);
|
Gsl::prod(gSymm, gVecX, gVecB);
|
||||||
convert(gVecB, _vecB);
|
convert(gVecB, _vecB);
|
||||||
// test gsl itself !
|
// test gsl itself !
|
||||||
|
Loading…
x
Reference in New Issue
Block a user