template<typename StorageIndex>
class Eigen::MetisOrdering< StorageIndex >
Get the fill-reducing ordering from the METIS package
If A is the original matrix and Ap is the permuted matrix, the fill-reducing permutation is defined as follows : Row (column) i of A is the matperm(i) row (column) of Ap. WARNING: As computed by METIS, this corresponds to the vector iperm (instead of perm)
template<typename StorageIndex >
template<typename MatrixType >
33 eigen_assert((
A.rows() ==
A.cols()) &&
"ONLY FOR SQUARED MATRICES");
39 visited.setConstant(-1);
40 for (StorageIndex
j = 0;
j <
m;
j++) {
44 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it) {
45 Index idx = it.index();
46 if (visited(idx) !=
j) {
52 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it) {
53 Index idx = it.index();
54 if (visited(idx) !=
j) {
65 visited.setConstant(-1);
66 StorageIndex CurNz = 0;
67 for (StorageIndex
j = 0;
j <
m;
j++) {
72 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it) {
73 StorageIndex idx = it.index();
74 if (visited(idx) !=
j) {
81 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it) {
82 StorageIndex idx = it.index();
83 if (visited(idx) !=
j) {
#define eigen_assert(x)
Definition: Macros.h:910
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Matrix< StorageIndex, Dynamic, 1 > IndexVector
Definition: MetisSupport.h:28
IndexVector m_indexPtr
Definition: MetisSupport.h:120
IndexVector m_innerIndices
Definition: MetisSupport.h:121
EIGEN_DEVICE_FUNC constexpr EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Definition: PlainObjectBase.h:294
int * m
Definition: level2_cplx_impl.h:294
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2
References Eigen::PlainObjectBase< Derived >::cols(), eigen_assert, j, m, Eigen::MetisOrdering< StorageIndex >::m_indexPtr, Eigen::MetisOrdering< StorageIndex >::m_innerIndices, Eigen::PlainObjectBase< Derived >::resize(), Eigen::PlainObjectBase< Derived >::rows(), and Eigen::PlainObjectBase< Derived >::setConstant().
Referenced by Eigen::MetisOrdering< StorageIndex >::operator()().