Go to the documentation of this file.
11 #ifndef EIGEN_ORDERING_H
12 #define EIGEN_ORDERING_H
26 template<
typename MatrixType>
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());
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];
147 for (StorageIndex
i = 0;
i <
n;
i++)
perm.indices()(
p(
i)) =
i;
idx_t idx_t idx_t idx_t idx_t * perm
Namespace containing all symbols from the Eigen library.
A versatible sparse matrix representation.
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
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)
void operator()(const MatrixType &mat, PermutationType &perm)
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
void operator()(const MatrixType &, PermutationType &perm)
IndexType recommended(IndexType nnz, IndexType n_row, IndexType n_col)
Returns the recommended value of Alen.
void operator()(const SparseSelfAdjointView< SrcType, SrcUpLo > &mat, PermutationType &perm)
void operator()(const MatrixType &mat, PermutationType &perm)
void ordering_helper_at_plus_a(const MatrixType &A, MatrixType &symmat)
#define EIGEN_UNUSED_VARIABLE(var)
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.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
static void set_defaults(double knobs[NKnobs])
set default parameters The use of this routine is optional.
Matrix< Scalar, Dynamic, Dynamic > C
Matrix< StorageIndex, Dynamic, 1 > IndexVector
void minimum_degree_ordering(SparseMatrix< Scalar, ColMajor, StorageIndex > &C, PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm)
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:52