10 #ifndef EIGEN_SIMPLICIAL_CHOLESKY_H 11 #define EIGEN_SIMPLICIAL_CHOLESKY_H 14 #include "./InternalHeaderCheck.h" 18 enum SimplicialCholeskyMode { SimplicialCholeskyLLT, SimplicialCholeskyLDLT };
21 template <
typename CholMatrixType,
typename InputMatrixType>
22 struct simplicial_cholesky_grab_input {
23 typedef CholMatrixType
const* ConstCholMatrixPtr;
24 static void run(
const InputMatrixType& input, ConstCholMatrixPtr& pmat, CholMatrixType& tmp) {
30 template <
typename MatrixType>
31 struct simplicial_cholesky_grab_input<MatrixType, MatrixType> {
32 typedef MatrixType
const* ConstMatrixPtr;
33 static void run(
const MatrixType& input, ConstMatrixPtr& pmat, MatrixType& ) { pmat = &input; }
50 template <
typename Derived>
53 using Base::m_isInitialized;
56 typedef typename internal::traits<Derived>::MatrixType MatrixType;
57 typedef typename internal::traits<Derived>::OrderingType OrderingType;
58 enum { UpLo = internal::traits<Derived>::UpLo };
59 typedef typename MatrixType::Scalar Scalar;
60 typedef typename MatrixType::RealScalar RealScalar;
61 typedef typename internal::traits<Derived>::DiagonalScalar DiagonalScalar;
62 typedef typename MatrixType::StorageIndex StorageIndex;
68 enum { ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime };
75 : m_info(
Success), m_factorizationIsOk(false), m_analysisIsOk(false), m_shiftOffset(0), m_shiftScale(1) {}
78 : m_info(
Success), m_factorizationIsOk(false), m_analysisIsOk(false), m_shiftOffset(0), m_shiftScale(1) {
79 derived().compute(matrix);
84 Derived& derived() {
return *
static_cast<Derived*
>(
this); }
85 const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
87 inline Index cols()
const {
return m_matrix.
cols(); }
88 inline Index rows()
const {
return m_matrix.
rows(); }
96 eigen_assert(m_isInitialized &&
"Decomposition is not initialized.");
118 Derived&
setShift(
const DiagonalScalar& offset,
const DiagonalScalar& scale = 1) {
119 m_shiftOffset = offset;
120 m_shiftScale = scale;
124 #ifndef EIGEN_PARSED_BY_DOXYGEN 126 template <
typename Stream>
127 void dumpMemory(Stream& s) {
130 << ((total += (m_matrix.
cols() + 1) *
sizeof(
int) + m_matrix.
nonZeros() * (
sizeof(int) +
sizeof(Scalar))) >> 20)
133 s <<
" diag: " << ((total += m_diag.size() *
sizeof(Scalar)) >> 20) <<
"Mb" 135 s <<
" tree: " << ((total += m_parent.size() *
sizeof(int)) >> 20) <<
"Mb" 137 s <<
" nonzeros: " << ((total += m_workSpace.size() *
sizeof(int)) >> 20) <<
"Mb" 139 s <<
" perm: " << ((total += m_P.
size() *
sizeof(int)) >> 20) <<
"Mb" 141 s <<
" perm^-1: " << ((total += m_Pinv.
size() *
sizeof(int)) >> 20) <<
"Mb" 143 s <<
" TOTAL: " << (total >> 20) <<
"Mb" 148 template <
typename Rhs,
typename Dest>
149 void _solve_impl(
const MatrixBase<Rhs>& b, MatrixBase<Dest>& dest)
const {
150 eigen_assert(m_factorizationIsOk &&
151 "The decomposition is not in a valid state for solving, you must first call either compute() or " 152 "symbolic()/numeric()");
153 eigen_assert(m_matrix.
rows() == b.rows());
163 derived().matrixL().solveInPlace(dest);
165 if (m_diag.size() > 0) dest = m_diag.asDiagonal().inverse() * dest;
168 derived().matrixU().solveInPlace(dest);
170 if (m_P.
size() > 0) dest = m_Pinv * dest;
173 template <
typename Rhs,
typename Dest>
174 void _solve_impl(
const SparseMatrixBase<Rhs>& b, SparseMatrixBase<Dest>& dest)
const {
175 internal::solve_sparse_through_dense_panels(derived(), b, dest);
178 #endif // EIGEN_PARSED_BY_DOXYGEN 182 template <
bool DoLDLT,
bool NonHermitian>
184 eigen_assert(matrix.rows() == matrix.cols());
185 Index size = matrix.cols();
187 ConstCholMatrixPtr pmat;
188 ordering<NonHermitian>(matrix, pmat, tmp);
189 analyzePattern_preordered(*pmat, DoLDLT);
190 factorize_preordered<DoLDLT, NonHermitian>(*pmat);
193 template <
bool DoLDLT,
bool NonHermitian>
194 void factorize(
const MatrixType& a) {
195 eigen_assert(a.rows() == a.cols());
196 Index size = a.cols();
197 CholMatrixType tmp(size, size);
198 ConstCholMatrixPtr pmat;
202 internal::simplicial_cholesky_grab_input<CholMatrixType, MatrixType>::run(a, pmat, tmp);
204 internal::permute_symm_to_symm<UpLo, Upper, NonHermitian>(a, tmp, m_P.
indices().data());
208 factorize_preordered<DoLDLT, NonHermitian>(*pmat);
211 template <
bool DoLDLT,
bool NonHermitian>
212 void factorize_preordered(
const CholMatrixType& a);
214 template <
bool DoLDLT,
bool NonHermitian>
215 void analyzePattern(
const MatrixType& a) {
216 eigen_assert(a.rows() == a.cols());
217 Index size = a.cols();
218 CholMatrixType tmp(size, size);
219 ConstCholMatrixPtr pmat;
220 ordering<NonHermitian>(a, pmat, tmp);
221 analyzePattern_preordered(*pmat, DoLDLT);
223 void analyzePattern_preordered(
const CholMatrixType& a,
bool doLDLT);
225 template <
bool NonHermitian>
226 void ordering(
const MatrixType& a, ConstCholMatrixPtr& pmat, CholMatrixType& ap);
228 inline DiagonalScalar getDiag(Scalar x) {
return internal::traits<Derived>::getDiag(x); }
229 inline Scalar getSymm(Scalar x) {
return internal::traits<Derived>::getSymm(x); }
233 inline bool operator()(
const Index& row,
const Index& col,
const Scalar&)
const {
return row != col; }
237 bool m_factorizationIsOk;
247 DiagonalScalar m_shiftOffset;
248 DiagonalScalar m_shiftScale;
251 template <
typename MatrixType_,
int UpLo_ =
Lower,
254 template <
typename MatrixType_,
int UpLo_ =
Lower,
257 template <
typename MatrixType_,
int UpLo_ =
Lower,
260 template <
typename MatrixType_,
int UpLo_ =
Lower,
263 template <
typename MatrixType_,
int UpLo_ =
Lower,
269 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
270 struct traits<
SimplicialLLT<MatrixType_, UpLo_, Ordering_> > {
271 typedef MatrixType_ MatrixType;
272 typedef Ordering_ OrderingType;
273 enum { UpLo = UpLo_ };
274 typedef typename MatrixType::Scalar Scalar;
275 typedef typename MatrixType::RealScalar DiagonalScalar;
276 typedef typename MatrixType::StorageIndex StorageIndex;
280 static inline MatrixL getL(
const CholMatrixType& m) {
return MatrixL(m); }
281 static inline MatrixU getU(
const CholMatrixType& m) {
return MatrixU(m.adjoint()); }
282 static inline DiagonalScalar getDiag(Scalar x) {
return numext::real(x); }
283 static inline Scalar getSymm(Scalar x) {
return numext::conj(x); }
286 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
287 struct traits<SimplicialLDLT<MatrixType_, UpLo_, Ordering_> > {
288 typedef MatrixType_ MatrixType;
289 typedef Ordering_ OrderingType;
290 enum { UpLo = UpLo_ };
291 typedef typename MatrixType::Scalar Scalar;
292 typedef typename MatrixType::RealScalar DiagonalScalar;
293 typedef typename MatrixType::StorageIndex StorageIndex;
294 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
295 typedef TriangularView<const CholMatrixType, Eigen::UnitLower> MatrixL;
296 typedef TriangularView<const typename CholMatrixType::AdjointReturnType, Eigen::UnitUpper> MatrixU;
297 static inline MatrixL getL(
const CholMatrixType& m) {
return MatrixL(m); }
298 static inline MatrixU getU(
const CholMatrixType& m) {
return MatrixU(m.adjoint()); }
299 static inline DiagonalScalar getDiag(Scalar x) {
return numext::real(x); }
300 static inline Scalar getSymm(Scalar x) {
return numext::conj(x); }
303 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
304 struct traits<SimplicialNonHermitianLLT<MatrixType_, UpLo_, Ordering_> > {
305 typedef MatrixType_ MatrixType;
306 typedef Ordering_ OrderingType;
307 enum { UpLo = UpLo_ };
308 typedef typename MatrixType::Scalar Scalar;
309 typedef typename MatrixType::Scalar DiagonalScalar;
310 typedef typename MatrixType::StorageIndex StorageIndex;
311 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
312 typedef TriangularView<const CholMatrixType, Eigen::Lower> MatrixL;
313 typedef TriangularView<const typename CholMatrixType::ConstTransposeReturnType, Eigen::Upper> MatrixU;
314 static inline MatrixL getL(
const CholMatrixType& m) {
return MatrixL(m); }
315 static inline MatrixU getU(
const CholMatrixType& m) {
return MatrixU(m.transpose()); }
316 static inline DiagonalScalar getDiag(Scalar x) {
return x; }
317 static inline Scalar getSymm(Scalar x) {
return x; }
320 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
321 struct traits<SimplicialNonHermitianLDLT<MatrixType_, UpLo_, Ordering_> > {
322 typedef MatrixType_ MatrixType;
323 typedef Ordering_ OrderingType;
324 enum { UpLo = UpLo_ };
325 typedef typename MatrixType::Scalar Scalar;
326 typedef typename MatrixType::Scalar DiagonalScalar;
327 typedef typename MatrixType::StorageIndex StorageIndex;
328 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
329 typedef TriangularView<const CholMatrixType, Eigen::UnitLower> MatrixL;
330 typedef TriangularView<const typename CholMatrixType::ConstTransposeReturnType, Eigen::UnitUpper> MatrixU;
331 static inline MatrixL getL(
const CholMatrixType& m) {
return MatrixL(m); }
332 static inline MatrixU getU(
const CholMatrixType& m) {
return MatrixU(m.transpose()); }
333 static inline DiagonalScalar getDiag(Scalar x) {
return x; }
334 static inline Scalar getSymm(Scalar x) {
return x; }
337 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
338 struct traits<SimplicialCholesky<MatrixType_, UpLo_, Ordering_> > {
339 typedef MatrixType_ MatrixType;
340 typedef Ordering_ OrderingType;
341 enum { UpLo = UpLo_ };
342 typedef typename MatrixType::Scalar Scalar;
343 typedef typename MatrixType::RealScalar DiagonalScalar;
344 static inline DiagonalScalar getDiag(Scalar x) {
return numext::real(x); }
345 static inline Scalar getSymm(Scalar x) {
return numext::conj(x); }
370 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
371 class SimplicialLLT :
public SimplicialCholeskyBase<SimplicialLLT<MatrixType_, UpLo_, Ordering_> > {
373 typedef MatrixType_ MatrixType;
374 enum { UpLo = UpLo_ };
375 typedef SimplicialCholeskyBase<SimplicialLLT> Base;
376 typedef typename MatrixType::Scalar Scalar;
377 typedef typename MatrixType::RealScalar RealScalar;
378 typedef typename MatrixType::StorageIndex StorageIndex;
379 typedef SparseMatrix<Scalar, ColMajor, Index> CholMatrixType;
380 typedef Matrix<Scalar, Dynamic, 1> VectorType;
381 typedef internal::traits<SimplicialLLT> Traits;
382 typedef typename Traits::MatrixL MatrixL;
383 typedef typename Traits::MatrixU MatrixU;
393 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LLT not factorized");
394 return Traits::getL(Base::m_matrix);
399 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LLT not factorized");
400 return Traits::getU(Base::m_matrix);
405 Base::template compute<false, false>(matrix);
415 void analyzePattern(
const MatrixType& a) { Base::template analyzePattern<false, false>(a); }
424 void factorize(
const MatrixType& a) { Base::template factorize<false, false>(a); }
428 Scalar detL = Base::m_matrix.diagonal().prod();
429 return numext::abs2(detL);
453 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
454 class SimplicialLDLT :
public SimplicialCholeskyBase<SimplicialLDLT<MatrixType_, UpLo_, Ordering_> > {
456 typedef MatrixType_ MatrixType;
457 enum { UpLo = UpLo_ };
458 typedef SimplicialCholeskyBase<SimplicialLDLT> Base;
459 typedef typename MatrixType::Scalar Scalar;
460 typedef typename MatrixType::RealScalar RealScalar;
461 typedef typename MatrixType::StorageIndex StorageIndex;
462 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
463 typedef Matrix<Scalar, Dynamic, 1> VectorType;
464 typedef internal::traits<SimplicialLDLT> Traits;
465 typedef typename Traits::MatrixL MatrixL;
466 typedef typename Traits::MatrixU MatrixU;
477 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
482 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
483 return Traits::getL(Base::m_matrix);
488 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
489 return Traits::getU(Base::m_matrix);
494 Base::template compute<true, false>(matrix);
504 void analyzePattern(
const MatrixType& a) { Base::template analyzePattern<true, false>(a); }
513 void factorize(
const MatrixType& a) { Base::template factorize<true, false>(a); }
539 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
540 class SimplicialNonHermitianLLT
541 :
public SimplicialCholeskyBase<SimplicialNonHermitianLLT<MatrixType_, UpLo_, Ordering_> > {
543 typedef MatrixType_ MatrixType;
544 enum { UpLo = UpLo_ };
545 typedef SimplicialCholeskyBase<SimplicialNonHermitianLLT> Base;
546 typedef typename MatrixType::Scalar Scalar;
547 typedef typename MatrixType::RealScalar RealScalar;
548 typedef typename MatrixType::StorageIndex StorageIndex;
549 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
550 typedef Matrix<Scalar, Dynamic, 1> VectorType;
551 typedef internal::traits<SimplicialNonHermitianLLT> Traits;
552 typedef typename Traits::MatrixL MatrixL;
553 typedef typename Traits::MatrixU MatrixU;
564 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LLT not factorized");
565 return Traits::getL(Base::m_matrix);
570 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LLT not factorized");
571 return Traits::getU(Base::m_matrix);
576 Base::template compute<false, true>(matrix);
586 void analyzePattern(
const MatrixType& a) { Base::template analyzePattern<false, true>(a); }
595 void factorize(
const MatrixType& a) { Base::template factorize<false, true>(a); }
599 Scalar detL = Base::m_matrix.diagonal().prod();
624 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
625 class SimplicialNonHermitianLDLT
626 :
public SimplicialCholeskyBase<SimplicialNonHermitianLDLT<MatrixType_, UpLo_, Ordering_> > {
628 typedef MatrixType_ MatrixType;
629 enum { UpLo = UpLo_ };
630 typedef SimplicialCholeskyBase<SimplicialNonHermitianLDLT> Base;
631 typedef typename MatrixType::Scalar Scalar;
632 typedef typename MatrixType::RealScalar RealScalar;
633 typedef typename MatrixType::StorageIndex StorageIndex;
634 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
635 typedef Matrix<Scalar, Dynamic, 1> VectorType;
636 typedef internal::traits<SimplicialNonHermitianLDLT> Traits;
637 typedef typename Traits::MatrixL MatrixL;
638 typedef typename Traits::MatrixU MatrixU;
649 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
654 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
655 return Traits::getL(Base::m_matrix);
660 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial LDLT not factorized");
661 return Traits::getU(Base::m_matrix);
666 Base::template compute<true, true>(matrix);
676 void analyzePattern(
const MatrixType& a) { Base::template analyzePattern<true, true>(a); }
685 void factorize(
const MatrixType& a) { Base::template factorize<true, true>(a); }
697 template <
typename MatrixType_,
int UpLo_,
typename Ordering_>
698 class SimplicialCholesky :
public SimplicialCholeskyBase<SimplicialCholesky<MatrixType_, UpLo_, Ordering_> > {
700 typedef MatrixType_ MatrixType;
701 enum { UpLo = UpLo_ };
702 typedef SimplicialCholeskyBase<SimplicialCholesky> Base;
703 typedef typename MatrixType::Scalar Scalar;
704 typedef typename MatrixType::RealScalar RealScalar;
705 typedef typename MatrixType::StorageIndex StorageIndex;
706 typedef SparseMatrix<Scalar, ColMajor, StorageIndex> CholMatrixType;
707 typedef Matrix<Scalar, Dynamic, 1> VectorType;
708 typedef internal::traits<SimplicialLDLT<MatrixType, UpLo> > LDLTTraits;
709 typedef internal::traits<SimplicialLLT<MatrixType, UpLo> > LLTTraits;
712 SimplicialCholesky() : Base(), m_LDLT(true) {}
714 explicit SimplicialCholesky(
const MatrixType& matrix) : Base(), m_LDLT(true) {
compute(matrix); }
716 SimplicialCholesky& setMode(SimplicialCholeskyMode mode) {
718 case SimplicialCholeskyLLT:
721 case SimplicialCholeskyLDLT:
731 inline const VectorType vectorD()
const {
732 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial Cholesky not factorized");
735 inline const CholMatrixType rawMatrix()
const {
736 eigen_assert(Base::m_factorizationIsOk &&
"Simplicial Cholesky not factorized");
737 return Base::m_matrix;
743 Base::template compute<true, false>(matrix);
745 Base::template compute<false, false>(matrix);
757 Base::template analyzePattern<true, false>(a);
759 Base::template analyzePattern<false, false>(a);
771 Base::template factorize<true, false>(a);
773 Base::template factorize<false, false>(a);
777 template <
typename Rhs,
typename Dest>
779 eigen_assert(Base::m_factorizationIsOk &&
780 "The decomposition is not in a valid state for solving, you must first call either compute() or " 781 "symbolic()/numeric()");
782 eigen_assert(Base::m_matrix.rows() == b.
rows());
784 if (Base::m_info !=
Success)
return;
786 if (Base::m_P.size() > 0)
787 dest = Base::m_P * b;
791 if (Base::m_matrix.nonZeros() > 0)
794 LDLTTraits::getL(Base::m_matrix).solveInPlace(dest);
796 LLTTraits::getL(Base::m_matrix).solveInPlace(dest);
799 if (Base::m_diag.size() > 0) dest = Base::m_diag.
real().asDiagonal().inverse() * dest;
801 if (Base::m_matrix.nonZeros() > 0)
804 LDLTTraits::getU(Base::m_matrix).solveInPlace(dest);
806 LLTTraits::getU(Base::m_matrix).solveInPlace(dest);
809 if (Base::m_P.size() > 0) dest = Base::m_Pinv * dest;
813 template <
typename Rhs,
typename Dest>
814 void _solve_impl(
const SparseMatrixBase<Rhs>& b, SparseMatrixBase<Dest>& dest)
const {
815 internal::solve_sparse_through_dense_panels(*
this, b, dest);
818 Scalar determinant()
const {
820 return Base::m_diag.prod();
822 Scalar detL = Diagonal<const CholMatrixType>(Base::m_matrix).prod();
823 return numext::abs2(detL);
831 template <
typename Derived>
832 template <
bool NonHermitian>
833 void SimplicialCholeskyBase<Derived>::ordering(
const MatrixType& a, ConstCholMatrixPtr& pmat, CholMatrixType& ap) {
834 eigen_assert(a.rows() == a.cols());
835 const Index size = a.rows();
838 if (!internal::is_same<OrderingType, NaturalOrdering<StorageIndex> >::value) {
841 internal::permute_symm_to_fullsymm<UpLo, NonHermitian>(a, C, NULL);
843 OrderingType ordering;
847 if (m_Pinv.size() > 0)
848 m_P = m_Pinv.inverse();
852 ap.resize(size, size);
853 internal::permute_symm_to_symm<UpLo, Upper, NonHermitian>(a, ap, m_P.indices().data());
857 if (
int(UpLo) ==
int(
Lower) || MatrixType::IsRowMajor) {
859 ap.resize(size, size);
860 internal::permute_symm_to_symm<UpLo, Upper, NonHermitian>(a, ap, NULL);
862 internal::simplicial_cholesky_grab_input<CholMatrixType, MatrixType>::run(a, pmat, ap);
868 #endif // EIGEN_SIMPLICIAL_CHOLESKY_H SimplicialLLT()
Definition: SimplicialCholesky.h:387
const PermutationMatrix< Dynamic, Dynamic, StorageIndex > & permutationP() const
Definition: SimplicialCholesky.h:102
SimplicialNonHermitianLLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:560
RealReturnType real() const
Definition: DenseBase.h:86
SimplicialNonHermitianLLT()
Definition: SimplicialCholesky.h:557
Index nonZeros() const
Definition: SparseCompressedBase.h:64
SimplicialNonHermitianLLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:575
SimplicialLDLT()
Definition: SimplicialCholesky.h:470
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:504
const VectorType vectorD() const
Definition: SimplicialCholesky.h:648
SimplicialCholeskyBase()
Definition: SimplicialCholesky.h:74
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:769
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:676
Index rows() const
Definition: SparseMatrix.h:159
const IndicesType & indices() const
Definition: PermutationMatrix.h:337
SimplicialNonHermitianLDLT()
Definition: SimplicialCholesky.h:642
A base class for sparse solvers.
Definition: SparseSolverBase.h:67
Derived & setShift(const DiagonalScalar &offset, const DiagonalScalar &scale=1)
Definition: SimplicialCholesky.h:118
A direct sparse LDLT Cholesky factorizations without square root, for symmetric non-hermitian matrice...
Definition: SimplicialCholesky.h:262
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:398
Definition: Ordering.h:48
Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
A direct sparse LDLT Cholesky factorizations without square root.
Definition: SimplicialCholesky.h:256
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:653
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:424
Index size() const
Definition: PermutationMatrix.h:96
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:569
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:487
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:392
Definition: Constants.h:211
Definition: SimplicialCholesky.h:265
A direct sparse LLT Cholesky factorizations, for symmetric non-hermitian matrices.
Definition: SimplicialCholesky.h:259
A base class for direct sparse Cholesky factorizations.
Definition: SimplicialCholesky.h:51
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:586
Scalar determinant() const
Definition: SimplicialCholesky.h:688
SimplicialNonHermitianLDLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:645
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:563
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:685
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:513
Scalar determinant() const
Definition: SimplicialCholesky.h:516
SimplicialLDLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:473
Definition: Constants.h:213
Definition: Constants.h:440
const VectorType vectorD() const
Definition: SimplicialCholesky.h:476
ComputationInfo info() const
Reports whether previous computation was successful.
Definition: SimplicialCholesky.h:95
SimplicialNonHermitianLDLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:665
SimplicialCholesky & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:741
Index cols() const
Definition: SparseMatrix.h:161
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:415
Definition: SimplicialCholesky.h:232
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:166
SimplicialLLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:404
void analyzePattern(const MatrixType &a)
Definition: SimplicialCholesky.h:755
void compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:183
const PermutationMatrix< Dynamic, Dynamic, StorageIndex > & permutationPinv() const
Definition: SimplicialCholesky.h:106
const MatrixL matrixL() const
Definition: SimplicialCholesky.h:481
A direct sparse LLT Cholesky factorizations.
Definition: SimplicialCholesky.h:253
constexpr Index rows() const noexcept
Definition: EigenBase.h:59
ComputationInfo
Definition: Constants.h:438
const MatrixU matrixU() const
Definition: SimplicialCholesky.h:659
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:52
Scalar determinant() const
Definition: SimplicialCholesky.h:598
Scalar determinant() const
Definition: SimplicialCholesky.h:427
SimplicialLDLT & compute(const MatrixType &matrix)
Definition: SimplicialCholesky.h:493
void factorize(const MatrixType &a)
Definition: SimplicialCholesky.h:595
SimplicialLLT(const MatrixType &matrix)
Definition: SimplicialCholesky.h:389