last round of changes, mainly to return derived types instead of base types, and fix various compilation issues

This commit is contained in:
Benoit Jacob
2009-11-09 07:51:31 -05:00
parent e4e58e8337
commit 9a0900e33e
15 changed files with 118 additions and 93 deletions

View File

@@ -124,13 +124,13 @@ template<typename _MatrixType> class LDLT
* \sa solveInPlace(), MatrixBase::ldlt()
*/
template<typename Rhs>
inline const ei_solve_return_value<LDLT, Rhs>
inline const ei_solve_retval<LDLT, Rhs>
solve(const MatrixBase<Rhs>& b) const
{
ei_assert(m_isInitialized && "LDLT is not initialized.");
ei_assert(m_matrix.rows()==b.rows()
&& "LDLT::solve(): invalid number of rows of the right hand side matrix b");
return ei_solve_return_value<LDLT, Rhs>(*this, b.derived());
return ei_solve_retval<LDLT, Rhs>(*this, b.derived());
}
template<typename Derived>
@@ -265,8 +265,8 @@ LDLT<MatrixType>& LDLT<MatrixType>::compute(const MatrixType& a)
}
template<typename _MatrixType, typename Rhs>
struct ei_solve_impl<LDLT<_MatrixType>, Rhs>
: ei_solve_return_value<LDLT<_MatrixType>, Rhs>
struct ei_solve_retval<LDLT<_MatrixType>, Rhs>
: ei_solve_retval_base<LDLT<_MatrixType>, Rhs>
{
EIGEN_MAKE_SOLVE_HELPERS(LDLT<_MatrixType>,Rhs)

View File

@@ -109,13 +109,13 @@ template<typename _MatrixType, int _UpLo> class LLT
* \sa solveInPlace(), MatrixBase::llt()
*/
template<typename Rhs>
inline const ei_solve_return_value<LLT, Rhs>
inline const ei_solve_retval<LLT, Rhs>
solve(const MatrixBase<Rhs>& b) const
{
ei_assert(m_isInitialized && "LLT is not initialized.");
ei_assert(m_matrix.rows()==b.rows()
&& "LLT::solve(): invalid number of rows of the right hand side matrix b");
return ei_solve_return_value<LLT, Rhs>(*this, b.derived());
return ei_solve_retval<LLT, Rhs>(*this, b.derived());
}
template<typename Derived>
@@ -259,8 +259,8 @@ LLT<MatrixType,_UpLo>& LLT<MatrixType,_UpLo>::compute(const MatrixType& a)
}
template<typename _MatrixType, int UpLo, typename Rhs>
struct ei_solve_impl<LLT<_MatrixType, UpLo>, Rhs>
: ei_solve_return_value<LLT<_MatrixType, UpLo>, Rhs>
struct ei_solve_retval<LLT<_MatrixType, UpLo>, Rhs>
: ei_solve_retval_base<LLT<_MatrixType, UpLo>, Rhs>
{
typedef LLT<_MatrixType,UpLo> LLTType;
EIGEN_MAKE_SOLVE_HELPERS(LLTType,Rhs)