11 #ifndef EIGEN_SPARSELU_SUPERNODAL_MATRIX_H 12 #define EIGEN_SPARSELU_SUPERNODAL_MATRIX_H 32 template <
typename _Scalar,
typename _StorageIndex>
46 IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col )
48 setInfos(m, n, nzval, nzval_colptr, rowind, rowind_colptr, col_to_sup, sup_to_col);
62 IndexVector& rowind_colptr, IndexVector& col_to_sup, IndexVector& sup_to_col )
157 template<
typename Dest>
181 template<
typename Scalar,
typename StorageIndex>
190 m_startidval(m_idval),
201 inline Scalar value()
const {
return m_matrix.valuePtr()[m_idval]; }
205 inline Index index()
const {
return m_matrix.rowIndex()[m_idrow]; }
211 inline operator bool()
const 213 return ( (m_idval < m_endidval) && (m_idval >= m_startidval)
214 && (m_idrow < m_endidrow) );
232 template<
typename Scalar,
typename Index_>
233 template<
typename Dest>
250 Index nrow = nsupr - nsupc;
275 U = A.template triangularView<UnitLower>().solve(U);
279 work.topRows(nrow).noalias() = A *
U;
284 Index iptr = istart + nsupc;
288 X(irow,
j) -= work(
i,
j);
301 #endif // EIGEN_SPARSELU_MATRIX_H
EIGEN_DEVICE_FUNC Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setZero(Index size)
MappedSuperNodalMatrix(Index m, Index n, ScalarVector &nzval, IndexVector &nzval_colptr, IndexVector &rowind, IndexVector &rowind_colptr, IndexVector &col_to_sup, IndexVector &sup_to_col)
A matrix or vector expression mapping an existing array of data.
void solveInPlace(MatrixBase< Dest > &X) const
Solve with the supernode triangular matrix.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
StorageIndex * m_sup_to_col
Namespace containing all symbols from the Eigen library.
StorageIndex * colIndexPtr()
StorageIndex * m_rowind_colptr
InnerIterator class to iterate over nonzero values of the current column in the supernodal matrix L...
InnerIterator(const MappedSuperNodalMatrix &mat, Index outer)
StorageIndex * m_nzval_colptr
StorageIndex * rowIndexPtr()
StorageIndex * m_col_to_sup
const Scalar * valuePtr() const
const StorageIndex * colToSup() const
InnerIterator & operator++()
StorageIndex * colToSup()
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
const StorageIndex * rowIndexPtr() const
void setInfos(Index m, Index n, ScalarVector &nzval, IndexVector &nzval_colptr, IndexVector &rowind, IndexVector &rowind_colptr, IndexVector &col_to_sup, IndexVector &sup_to_col)
const MappedSuperNodalMatrix & m_matrix
StorageIndex * supToCol()
const StorageIndex * colIndexPtr() const
const StorageIndex * rowIndex() const
const StorageIndex * supToCol() const
Matrix< Scalar, Dynamic, 1 > ScalarVector
_StorageIndex StorageIndex
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
a class to manipulate the L supernodal factor from the SparseLU factorization
Base class for all dense matrices, vectors, and expressions.
~MappedSuperNodalMatrix()
StorageIndex * rowIndex()
An InnerIterator allows to loop over the element of any matrix expression.