mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-11 18:00:51 +08:00
fix #14: make llt::solve() and also ldlt::solve() work with uninitialized result
This commit is contained in:
parent
c6e81869d0
commit
a57325e971
@ -117,8 +117,8 @@ template<typename MatrixType> class LDLT
|
|||||||
return m_sign == -1;
|
return m_sign == -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResultType>
|
||||||
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
bool solve(const MatrixBase<RhsDerived> &b, ResultType *result) const;
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
|
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
|
||||||
@ -248,9 +248,9 @@ void LDLT<MatrixType>::compute(const MatrixType& a)
|
|||||||
* \sa LDLT::solveInPlace(), MatrixBase::ldlt()
|
* \sa LDLT::solveInPlace(), MatrixBase::ldlt()
|
||||||
*/
|
*/
|
||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResultType>
|
||||||
bool LDLT<MatrixType>
|
bool LDLT<MatrixType>
|
||||||
::solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const
|
::solve(const MatrixBase<RhsDerived> &b, ResultType *result) const
|
||||||
{
|
{
|
||||||
ei_assert(m_isInitialized && "LDLT is not initialized.");
|
ei_assert(m_isInitialized && "LDLT is not initialized.");
|
||||||
const int size = m_matrix.rows();
|
const int size = m_matrix.rows();
|
||||||
|
@ -87,8 +87,8 @@ template<typename MatrixType> class LLT
|
|||||||
return m_matrix;
|
return m_matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResultType>
|
||||||
bool solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const;
|
bool solve(const MatrixBase<RhsDerived> &b, ResultType *result) const;
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
|
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
|
||||||
@ -165,8 +165,8 @@ void LLT<MatrixType>::compute(const MatrixType& a)
|
|||||||
* \sa LLT::solveInPlace(), MatrixBase::llt()
|
* \sa LLT::solveInPlace(), MatrixBase::llt()
|
||||||
*/
|
*/
|
||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
template<typename RhsDerived, typename ResDerived>
|
template<typename RhsDerived, typename ResultType>
|
||||||
bool LLT<MatrixType>::solve(const MatrixBase<RhsDerived> &b, MatrixBase<ResDerived> *result) const
|
bool LLT<MatrixType>::solve(const MatrixBase<RhsDerived> &b, ResultType *result) const
|
||||||
{
|
{
|
||||||
ei_assert(m_isInitialized && "LLT is not initialized.");
|
ei_assert(m_isInitialized && "LLT is not initialized.");
|
||||||
const int size = m_matrix.rows();
|
const int size = m_matrix.rows();
|
||||||
|
Loading…
Reference in New Issue
Block a user