10 #ifndef EIGEN_INCOMPLETE_LU_H 11 #define EIGEN_INCOMPLETE_LU_H 15 template <
typename _Scalar>
32 template<
typename MatrixType>
41 template<
typename MatrixType>
47 for(
int i=0; i<
size; ++i)
50 for(; k_it && k_it.index()<i; ++k_it)
53 k_it.valueRef() /= diag(k);
57 while(kj_it && kj_it.index()<=k) ++kj_it;
60 if(kj_it.index()==j_it.index())
62 j_it.valueRef() -= k_it.value() * kj_it.value();
66 else if(kj_it.index()<j_it.index()) ++kj_it;
70 if(k_it && k_it.index()==i) diag(i) = k_it.value();
77 template<
typename Rhs,
typename Dest>
80 x =
m_lu.template triangularView<UnitLower>().
solve(b);
81 x =
m_lu.template triangularView<Upper>().
solve(x);
90 #endif // EIGEN_INCOMPLETE_LU_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index cols() const
Matrix< Scalar, Dynamic, 1 > Vector
A base class for sparse solvers.
const Solve< IncompleteLU< _Scalar >, Rhs > solve(const MatrixBase< Rhs > &b) const
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
Matrix< Scalar, Dynamic, Dynamic > MatrixType
SparseSolverBase< IncompleteLU< _Scalar > > Base
void _solve_impl(const Rhs &b, Dest &x) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Base::InnerIterator InnerIterator
IncompleteLU & compute(const MatrixType &mat)
IncompleteLU(const MatrixType &mat)
SparseMatrix< Scalar, RowMajor > FactorType
EIGEN_DEVICE_FUNC const Scalar & b