mark LLT/LDLT solveInPlace func internal and rm their boolean returned value

This commit is contained in:
Gael Guennebaud 2010-10-05 15:56:50 +02:00
parent 2334291157
commit 01fad14d78
2 changed files with 13 additions and 10 deletions

View File

@ -363,7 +363,9 @@ struct ei_solve_retval<LDLT<_MatrixType,_UpLo>, Rhs>
} }
}; };
/** This is the \em in-place version of solve(). /** \internal use x = ldlt_object.solve(x);
*
* This is the \em in-place version of solve().
* *
* \param bAndX represents both the right-hand side matrix b and result x. * \param bAndX represents both the right-hand side matrix b and result x.
* *

View File

@ -76,11 +76,11 @@ template<typename _MatrixType, int _UpLo> class LLT
typedef LLT_Traits<MatrixType,UpLo> Traits; typedef LLT_Traits<MatrixType,UpLo> Traits;
/** /**
* \brief Default Constructor. * \brief Default Constructor.
* *
* The default constructor is useful in cases in which the user intends to * The default constructor is useful in cases in which the user intends to
* perform decompositions via LLT::compute(const MatrixType&). * perform decompositions via LLT::compute(const MatrixType&).
*/ */
LLT() : m_matrix(), m_isInitialized(false) {} LLT() : m_matrix(), m_isInitialized(false) {}
/** \brief Default Constructor with memory preallocation /** \brief Default Constructor with memory preallocation
@ -134,7 +134,7 @@ template<typename _MatrixType, int _UpLo> class LLT
} }
template<typename Derived> template<typename Derived>
bool solveInPlace(MatrixBase<Derived> &bAndX) const; void solveInPlace(MatrixBase<Derived> &bAndX) const;
LLT& compute(const MatrixType& matrix); LLT& compute(const MatrixType& matrix);
@ -309,7 +309,9 @@ struct ei_solve_retval<LLT<_MatrixType, UpLo>, Rhs>
} }
}; };
/** This is the \em in-place version of solve(). /** \internal use x = llt_object.solve(x);
*
* This is the \em in-place version of solve().
* *
* \param bAndX represents both the right-hand side matrix b and result x. * \param bAndX represents both the right-hand side matrix b and result x.
* *
@ -322,13 +324,12 @@ struct ei_solve_retval<LLT<_MatrixType, UpLo>, Rhs>
*/ */
template<typename MatrixType, int _UpLo> template<typename MatrixType, int _UpLo>
template<typename Derived> template<typename Derived>
bool LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const void LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
{ {
ei_assert(m_isInitialized && "LLT is not initialized."); ei_assert(m_isInitialized && "LLT is not initialized.");
ei_assert(m_matrix.rows()==bAndX.rows()); ei_assert(m_matrix.rows()==bAndX.rows());
matrixL().solveInPlace(bAndX); matrixL().solveInPlace(bAndX);
matrixU().solveInPlace(bAndX); matrixU().solveInPlace(bAndX);
return true;
} }
/** \returns the matrix represented by the decomposition, /** \returns the matrix represented by the decomposition,