10 #ifndef EIGEN_INCOMPLETE_LU_H
11 #define EIGEN_INCOMPLETE_LU_H
17 template <
typename Scalar_>
26 typedef typename Vector::Index
Index;
34 template<
typename MatrixType>
43 template<
typename MatrixType>
51 typename FactorType::InnerIterator k_it(
m_lu,
i);
52 for(; k_it && k_it.index()<
i; ++k_it)
55 k_it.valueRef() /= diag(k);
57 typename FactorType::InnerIterator j_it(k_it);
58 typename FactorType::InnerIterator kj_it(
m_lu, k);
59 while(kj_it && kj_it.index()<=k) ++kj_it;
62 if(kj_it.index()==j_it.index())
64 j_it.valueRef() -= k_it.value() * kj_it.value();
68 else if(kj_it.index()<j_it.index()) ++kj_it;
72 if(k_it && k_it.index()==
i) diag(
i) = k_it.value();
79 template<
typename Rhs,
typename Dest>
82 x =
m_lu.template triangularView<UnitLower>().solve(
b);
83 x =
m_lu.template triangularView<Upper>().solve(
x);
SparseSolverBase< IncompleteLU< Scalar_ > > Base
SparseMatrix< Scalar, RowMajor > FactorType
IncompleteLU(const MatrixType &mat)
void _solve_impl(const Rhs &b, Dest &x) const
Matrix< Scalar, Dynamic, Dynamic > MatrixType
IncompleteLU & compute(const MatrixType &mat)
Matrix< Scalar, Dynamic, 1 > Vector
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend