43 #include "../Core/util/NonMPL2.h" 45 #ifndef EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H 46 #define EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H 50 template<
typename Derived>
54 m_matrix.resize(size, size);
55 m_parent.resize(size);
56 m_nonZerosPerCol.resize(size);
65 m_nonZerosPerCol[k] = 0;
72 for(; tags[
i] != k; i = m_parent[
i])
75 if (m_parent[i] == -1)
77 m_nonZerosPerCol[
i]++;
88 Lp[k+1] = Lp[k] + m_nonZerosPerCol[k] + (doLDLT ? 0 : 1);
90 m_matrix.resizeNonZeros(Lp[size]);
92 m_isInitialized =
true;
94 m_analysisIsOk =
true;
95 m_factorizationIsOk =
false;
99 template<
typename Derived>
100 template<
bool DoLDLT>
105 eigen_assert(m_analysisIsOk &&
"You must first call analyzePattern()");
113 Scalar* Lx = m_matrix.valuePtr();
120 m_diag.resize(DoLDLT ? size : 0);
128 m_nonZerosPerCol[k] = 0;
136 for(len = 0; tags[
i] != k; i = m_parent[
i])
142 pattern[--top] = pattern[--
len];
150 for(; top <
size; ++top)
159 l_ki = yi / m_diag[
i];
161 yi = l_ki = yi / Lx[Lp[
i]];
165 for(p = Lp[i] + (DoLDLT ? 0 : 1); p <
p2; ++
p)
170 ++m_nonZerosPerCol[
i];
183 Index p = Lp[k] + m_nonZerosPerCol[k]++;
194 m_factorizationIsOk =
true;
199 #endif // EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Namespace containing all symbols from the Eigen library.
void analyzePattern_preordered(const CholMatrixType &a, bool doLDLT)
MatrixType::Scalar Scalar
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Base::InnerIterator InnerIterator
NumTraits< Scalar >::Real RealScalar
MatrixType::RealScalar RealScalar
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
MatrixType::StorageIndex StorageIndex
void factorize_preordered(const CholMatrixType &a)
ScalarWithExceptions conj(const ScalarWithExceptions &x)