9 #ifndef METIS_SUPPORT_H
10 #define METIS_SUPPORT_H
23 template <
typename StorageIndex>
30 template <
typename MatrixType>
34 eigen_assert((
A.rows() ==
A.cols()) &&
"ONLY FOR SQUARED MATRICES");
41 for (StorageIndex
j = 0;
j <
m;
j++)
46 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it)
48 Index idx = it.index();
49 if (visited(idx) !=
j )
56 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it)
58 Index idx = it.index();
72 StorageIndex CurNz = 0;
73 for (StorageIndex
j = 0;
j <
m;
j++)
79 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it)
81 StorageIndex idx = it.index();
82 if (visited(idx) !=
j )
90 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it)
92 StorageIndex idx = it.index();
104 template <
typename MatrixType>
107 StorageIndex
m = internal::convert_index<StorageIndex>(
A.cols());
116 if(output_error != METIS_OK)
119 std::cerr <<
"ERROR WHILE CALLING THE METIS PACKAGE \n";
128 for (
int j = 0;
j <
m;
j++)
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
void operator()(const MatrixType &A, PermutationType &matperm)
void get_symmetrized_graph(const MatrixType &A)
IndexVector m_innerIndices
Matrix< StorageIndex, Dynamic, 1 > IndexVector
void resize(Index newSize)
const IndicesType & indices() const
Derived & setConstant(Index size, const Scalar &val)
const Scalar * data() const
constexpr void resize(Index rows, Index cols)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.