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>
159 template<
bool Conjugate,
typename Dest>
184 template<
typename Scalar,
typename StorageIndex>
193 m_startidval(m_idval),
204 inline Scalar value()
const {
return m_matrix.valuePtr()[m_idval]; }
208 inline Index index()
const {
return m_matrix.rowIndex()[m_idrow]; }
214 inline operator bool()
const 216 return ( (m_idval < m_endidval) && (m_idval >= m_startidval)
217 && (m_idrow < m_endidrow) );
235 template<
typename Scalar,
typename Index_>
236 template<
typename Dest>
253 Index nrow = nsupr - nsupc;
278 U = A.template triangularView<UnitLower>().solve(U);
282 work.topRows(nrow).noalias() = A *
U;
287 Index iptr = istart + nsupc;
291 X(irow,
j) -= work(
i,
j);
300 template<
typename Scalar,
typename Index_>
301 template<
bool Conjugate,
typename Dest>
316 Index nrow = nsupr - nsupc;
341 Index iptr = istart + nsupc;
345 work.topRows(nrow)(
i,
j)=
X(irow,
j);
354 U = U - A.adjoint() * work.topRows(nrow);
356 U = U - A.transpose() * work.topRows(nrow);
361 U = A.adjoint().template triangularView<UnitUpper>().solve(U);
363 U = A.transpose().template triangularView<UnitUpper>().solve(U);
375 #endif // EIGEN_SPARSELU_MATRIX_H
EIGEN_DEVICE_FUNC Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setZero(Index size)
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
MappedSuperNodalMatrix(Index m, Index n, ScalarVector &nzval, IndexVector &nzval_colptr, IndexVector &rowind, IndexVector &rowind_colptr, IndexVector &col_to_sup, IndexVector &sup_to_col)
const StorageIndex * rowIndexPtr() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
A matrix or vector expression mapping an existing array of data.
const Scalar * valuePtr() 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)
AnnoyingScalar conj(const AnnoyingScalar &x)
StorageIndex * m_nzval_colptr
StorageIndex * rowIndexPtr()
StorageIndex * m_col_to_sup
EIGEN_STRONG_INLINE Index row() const
InnerIterator & operator++()
StorageIndex * colToSup()
void solveTransposedInPlace(MatrixBase< Dest > &X) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
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()
void solveInPlace(MatrixBase< Dest > &X) const
Solve with the supernode triangular matrix.
const StorageIndex * supToCol() const
Matrix< Scalar, Dynamic, 1 > ScalarVector
EIGEN_STRONG_INLINE Scalar value() const
_StorageIndex StorageIndex
Matrix< StorageIndex, Dynamic, 1 > IndexVector
const StorageIndex * colToSup() const
const StorageIndex * rowIndex() const
Convenience specialization of Stride to specify only an outer stride See class Map for some examples...
const StorageIndex * colIndexPtr() const
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.