20#ifndef EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H
21#define EIGEN_SIMPLICIAL_CHOLESKY_IMPL_H
25template<
typename Derived>
30 m_parent.resize(
size);
31 m_nonZerosPerCol.resize(
size);
40 m_nonZerosPerCol[k] = 0;
47 for(; tags[
i] != k;
i = m_parent[
i])
50 if (m_parent[
i] == -1)
52 m_nonZerosPerCol[
i]++;
63 Lp[k+1] = Lp[k] + m_nonZerosPerCol[k] + (doLDLT ? 0 : 1);
65 m_matrix.resizeNonZeros(Lp[
size]);
67 m_isInitialized =
true;
69 m_analysisIsOk =
true;
70 m_factorizationIsOk =
false;
74template<
typename Derived>
80 eigen_assert(m_analysisIsOk &&
"You must first call analyzePattern()");
88 Scalar* Lx = m_matrix.valuePtr();
95 m_diag.resize(DoLDLT ?
size : 0);
103 m_nonZerosPerCol[k] = 0;
109 y[
i] += numext::conj(it.value());
111 for(len = 0; tags[
i] != k;
i = m_parent[
i])
117 pattern[--top] = pattern[--len];
123 RealScalar d = numext::real(
y[k]) * m_shiftScale + m_shiftOffset;
125 for(; top <
size; ++top)
134 l_ki = yi / numext::real(m_diag[
i]);
136 yi = l_ki = yi / Lx[Lp[
i]];
138 Index p2 = Lp[
i] + m_nonZerosPerCol[
i];
140 for(
p = Lp[
i] + (DoLDLT ? 0 : 1);
p < p2; ++
p)
141 y[Li[
p]] -= numext::conj(Lx[
p]) * yi;
142 d -= numext::real(l_ki * numext::conj(yi));
145 ++m_nonZerosPerCol[
i];
158 Index p = Lp[k] + m_nonZerosPerCol[k]++;
169 m_factorizationIsOk =
true;
int i
Definition BiCGSTAB_step_by_step.cpp:9
#define eigen_assert(x)
Definition Macros.h:1037
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
Definition Memory.h:768
float * p
Definition Tutorial_Map_using.cpp:9
Scalar Scalar int size
Definition benchVecAdd.cpp:17
SCALAR Scalar
Definition bench_gemm.cpp:46
NumTraits< Scalar >::Real RealScalar
Definition bench_gemm.cpp:47
MatrixType::RealScalar RealScalar
Definition SimplicialCholesky.h:65
void factorize_preordered(const CholMatrixType &a)
Definition SimplicialCholesky_impl.h:76
MatrixType::Scalar Scalar
Definition SimplicialCholesky.h:64
MatrixType::StorageIndex StorageIndex
Definition SimplicialCholesky.h:66
void analyzePattern_preordered(const CholMatrixType &a, bool doLDLT)
Definition SimplicialCholesky_impl.h:26
Definition SparseCompressedBase.h:159
Index rows() const
Definition SparseMatrix.h:138
Index cols() const
Definition SparseMatrix.h:140
@ NumericalIssue
Definition Constants.h:444
@ Success
Definition Constants.h:442
Scalar * y
Definition level1_cplx_impl.h:124
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74