diff options
author | 2009-11-18 18:15:19 +0100 | |
---|---|---|
committer | 2009-11-18 18:15:19 +0100 | |
commit | e3d890bc5a89798eff50ff6650292b4fa934f72e (patch) | |
tree | 3c7d40332a019dce2773fc6a096d046eeab9fb7a /Eigen/src/Cholesky/LDLT.h | |
parent | 0529ecfe1b43d40e40755a2d856188d3ded2c14e (diff) |
Another big refactoring change:
* add a new Eigen2Support module including Cwise, Flagged, and some other deprecated stuff
* add a few cwiseXxx functions
* adapt a few modules to use cwiseXxx instead of the .cwise() prefix
Diffstat (limited to 'Eigen/src/Cholesky/LDLT.h')
-rw-r--r-- | Eigen/src/Cholesky/LDLT.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index d0f292634..c13be9ac2 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -81,7 +81,7 @@ template<typename _MatrixType> class LDLT /** \returns the lower triangular matrix L */ inline TriangularView<MatrixType, UnitLowerTriangular> matrixL(void) const - { + { ei_assert(m_isInitialized && "LDLT is not initialized."); return m_matrix; } @@ -132,7 +132,7 @@ template<typename _MatrixType> class LDLT && "LDLT::solve(): invalid number of rows of the right hand side matrix b"); return ei_solve_retval<LDLT, Rhs>(*this, b.derived()); } - + template<typename Derived> bool solveInPlace(MatrixBase<Derived> &bAndX) const; @@ -150,7 +150,7 @@ template<typename _MatrixType> class LDLT inline int rows() const { return m_matrix.rows(); } inline int cols() const { return m_matrix.cols(); } - + protected: /** \internal * Used to compute and store the Cholesky decomposition A = L D L^* = U^* D U. @@ -194,7 +194,7 @@ LDLT<MatrixType>& LDLT<MatrixType>::compute(const MatrixType& a) { // Find largest diagonal element int index_of_biggest_in_corner; - biggest_in_corner = m_matrix.diagonal().end(size-j).cwise().abs() + biggest_in_corner = m_matrix.diagonal().end(size-j).cwiseAbs() .maxCoeff(&index_of_biggest_in_corner); index_of_biggest_in_corner += j; @@ -304,7 +304,7 @@ bool LDLT<MatrixType>::solveInPlace(MatrixBase<Derived> &bAndX) const m_matrix.template triangularView<UnitLowerTriangular>().solveInPlace(bAndX); // w = D^-1 y - bAndX = (m_matrix.diagonal().cwise().inverse().asDiagonal() * bAndX).lazy(); + bAndX = m_matrix.diagonal().asDiagonal().inverse() * bAndX; // u = L^-T w m_matrix.adjoint().template triangularView<UnitUpperTriangular>().solveInPlace(bAndX); |