aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Cholesky/LDLT.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Cholesky/LDLT.h')
-rw-r--r--Eigen/src/Cholesky/LDLT.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h
index 1cb1294ac..adca9fe2e 100644
--- a/Eigen/src/Cholesky/LDLT.h
+++ b/Eigen/src/Cholesky/LDLT.h
@@ -123,7 +123,7 @@ template<typename MatrixType> class LDLT
template<typename Derived>
bool solveInPlace(MatrixBase<Derived> &bAndX) const;
- void compute(const MatrixType& matrix);
+ LDLT& compute(const MatrixType& matrix);
protected:
/** \internal
@@ -142,7 +142,7 @@ template<typename MatrixType> class LDLT
/** Compute / recompute the LDLT decomposition A = L D L^* = U^* D U of \a matrix
*/
template<typename MatrixType>
-void LDLT<MatrixType>::compute(const MatrixType& a)
+LDLT<MatrixType>& LDLT<MatrixType>::compute(const MatrixType& a)
{
ei_assert(a.rows()==a.cols());
const int size = a.rows();
@@ -154,7 +154,7 @@ void LDLT<MatrixType>::compute(const MatrixType& a)
m_transpositions.setZero();
m_sign = ei_real(a.coeff(0,0))>0 ? 1:-1;
m_isInitialized = true;
- return;
+ return *this;
}
RealScalar cutoff = 0, biggest_in_corner;
@@ -235,6 +235,7 @@ void LDLT<MatrixType>::compute(const MatrixType& a)
}
m_isInitialized = true;
+ return *this;
}
/** Computes the solution x of \f$ A x = b \f$ using the current decomposition of A.