From a57325e971c749a42ccfc200772054a72099414c Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Fri, 19 Jun 2009 17:01:32 +0200 Subject: [PATCH] fix #14: make llt::solve() and also ldlt::solve() work with uninitialized result --- Eigen/src/Cholesky/LDLT.h | 8 ++++---- Eigen/src/Cholesky/LLT.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index 039e542bc..94660245e 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -117,8 +117,8 @@ template class LDLT return m_sign == -1; } - template - bool solve(const MatrixBase &b, MatrixBase *result) const; + template + bool solve(const MatrixBase &b, ResultType *result) const; template bool solveInPlace(MatrixBase &bAndX) const; @@ -248,9 +248,9 @@ void LDLT::compute(const MatrixType& a) * \sa LDLT::solveInPlace(), MatrixBase::ldlt() */ template -template +template bool LDLT -::solve(const MatrixBase &b, MatrixBase *result) const +::solve(const MatrixBase &b, ResultType *result) const { ei_assert(m_isInitialized && "LDLT is not initialized."); const int size = m_matrix.rows(); diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index cb2524e9d..215cda346 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -87,8 +87,8 @@ template class LLT return m_matrix; } - template - bool solve(const MatrixBase &b, MatrixBase *result) const; + template + bool solve(const MatrixBase &b, ResultType *result) const; template bool solveInPlace(MatrixBase &bAndX) const; @@ -165,8 +165,8 @@ void LLT::compute(const MatrixType& a) * \sa LLT::solveInPlace(), MatrixBase::llt() */ template -template -bool LLT::solve(const MatrixBase &b, MatrixBase *result) const +template +bool LLT::solve(const MatrixBase &b, ResultType *result) const { ei_assert(m_isInitialized && "LLT is not initialized."); const int size = m_matrix.rows();