11 #ifndef EIGEN_ORDERING_H 12 #define EIGEN_ORDERING_H 26 template<
typename MatrixType>
31 for (
int i = 0;
i < C.rows();
i++)
33 for (
typename MatrixType::InnerIterator it(C,
i); it; ++it)
49 template <
typename StorageIndex>
58 template <
typename MatrixType>
71 template <
typename SrcType,
unsigned int SrcUpLo>
90 template <
typename StorageIndex>
97 template <
typename MatrixType>
113 template<
typename StorageIndex>
123 template <
typename MatrixType>
126 eigen_assert(mat.isCompressed() &&
"COLAMDOrdering requires a sparse matrix in compressed mode. Call .makeCompressed() before passing it to COLAMDOrdering");
128 StorageIndex
m = StorageIndex(mat.rows());
129 StorageIndex
n = StorageIndex(mat.cols());
130 StorageIndex nnz = StorageIndex(mat.nonZeros());
138 IndexVector
p(n+1),
A(Alen);
139 for(StorageIndex
i=0;
i <=
n;
i++)
p(
i) = mat.outerIndexPtr()[
i];
140 for(StorageIndex
i=0;
i < nnz;
i++)
A(
i) = mat.innerIndexPtr()[
i];
A versatible sparse matrix representation.
Namespace containing all symbols from the Eigen library.
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
void ordering_helper_at_plus_a(const MatrixType &A, MatrixType &symmat)
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
void operator()(const MatrixType &mat, PermutationType &perm)
const IndicesType & indices() const
IndexType recommended(IndexType nnz, IndexType n_row, IndexType n_col)
Returns the recommended value of Alen.
static bool compute_ordering(IndexType n_row, IndexType n_col, IndexType Alen, IndexType *A, IndexType *p, double knobs[NKnobs], IndexType stats[NStats])
Computes a column ordering using the column approximate minimum degree ordering.
idx_t idx_t idx_t idx_t idx_t * perm
void minimum_degree_ordering(SparseMatrix< Scalar, ColMajor, StorageIndex > &C, PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm)
Matrix< Scalar, Dynamic, Dynamic > C
Matrix< StorageIndex, Dynamic, 1 > IndexVector
void resize(Index newSize)
internal::enable_if< internal::valid_indexed_view_overload< RowIndices, ColIndices >::value &&internal::traits< typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::ReturnAsIndexedView, typename EIGEN_INDEXED_VIEW_METHOD_TYPE< RowIndices, ColIndices >::type >::type operator()(const RowIndices &rowIndices, const ColIndices &colIndices) EIGEN_INDEXED_VIEW_METHOD_CONST
int EIGEN_BLAS_FUNC() symm(const char *side, const char *uplo, const int *m, const int *n, const RealScalar *palpha, const RealScalar *pa, const int *lda, const RealScalar *pb, const int *ldb, const RealScalar *pbeta, RealScalar *pc, const int *ldc)
#define EIGEN_UNUSED_VARIABLE(var)
static void set_defaults(double knobs[NKnobs])
set default parameters The use of this routine is optional.