Go to the documentation of this file.
11 #ifndef EIGEN_SPARSELU_SUPERNODAL_MATRIX_H
12 #define EIGEN_SPARSELU_SUPERNODAL_MATRIX_H
32 template <
typename _Scalar,
typename _StorageIndex>
48 setInfos(
m,
n, nzval, nzval_colptr, rowind, rowind_colptr, col_to_sup, 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>
244 const Scalar * Lval = valuePtr();
247 for (
Index k = 0; k <= nsuper(); k ++)
249 Index fsupc = supToCol()[k];
250 Index istart = rowIndexPtr()[fsupc];
251 Index nsupr = rowIndexPtr()[fsupc+1] - istart;
252 Index nsupc = supToCol()[k+1] - fsupc;
253 Index nrow = nsupr - nsupc;
272 Index luptr = colIndexPtr()[fsupc];
273 Index lda = colIndexPtr()[fsupc+1] - luptr;
278 U =
A.template triangularView<UnitLower>().solve(
U);
282 work.topRows(nrow).noalias() =
A *
U;
287 Index iptr = istart + nsupc;
290 irow = rowIndex()[iptr];
291 X(irow,
j) -= work(
i,
j);
300 template<
typename Scalar,
typename Index_>
301 template<
bool Conjugate,
typename Dest>
307 const Scalar * Lval = valuePtr();
310 for (
Index k = nsuper(); k >= 0; k--)
312 Index fsupc = supToCol()[k];
313 Index istart = rowIndexPtr()[fsupc];
314 Index nsupr = rowIndexPtr()[fsupc+1] - istart;
315 Index nsupc = supToCol()[k+1] - fsupc;
316 Index nrow = nsupr - nsupc;
335 Index luptr = colIndexPtr()[fsupc];
336 Index lda = colIndexPtr()[fsupc+1] - luptr;
341 Index iptr = istart + nsupc;
344 irow = rowIndex()[iptr];
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
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
Namespace containing all symbols from the Eigen library.
EIGEN_STRONG_INLINE Index row() const
~MappedSuperNodalMatrix()
Matrix< Scalar, Dynamic, 1 > ScalarVector
StorageIndex * colToSup()
StorageIndex * m_nzval_colptr
InnerIterator(const MappedSuperNodalMatrix &mat, Index outer)
StorageIndex * m_sup_to_col
void solveInPlace(MatrixBase< Dest > &X) const
Solve with the supernode triangular matrix.
StorageIndex * m_rowind_colptr
StorageIndex * colIndexPtr()
const MappedSuperNodalMatrix & m_matrix
StorageIndex * rowIndex()
EIGEN_STRONG_INLINE Scalar value() const
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
const StorageIndex * rowIndex() const
MappedSuperNodalMatrix(Index m, Index n, ScalarVector &nzval, IndexVector &nzval_colptr, IndexVector &rowind, IndexVector &rowind_colptr, IndexVector &col_to_sup, IndexVector &sup_to_col)
AnnoyingScalar conj(const AnnoyingScalar &x)
A matrix or vector expression mapping an existing array of data.
An InnerIterator allows to loop over the element of any matrix expression.
void solveTransposedInPlace(MatrixBase< Dest > &X) const
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)
InnerIterator & operator++()
const Scalar * valuePtr() const
const StorageIndex * supToCol() const
const StorageIndex * colToSup() const
a class to manipulate the L supernodal factor from the SparseLU factorization
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
const StorageIndex * colIndexPtr() const
StorageIndex * rowIndexPtr()
StorageIndex * m_col_to_sup
EIGEN_DEVICE_FUNC Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > & setZero(Index size)
InnerIterator class to iterate over nonzero values of the current column in the supernodal matrix L.
Base class for all dense matrices, vectors, and expressions.
StorageIndex * supToCol()
_StorageIndex StorageIndex
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:13:38