Go to the documentation of this file.
9 #ifndef METIS_SUPPORT_H
10 #define METIS_SUPPORT_H
21 template <
typename StorageIndex>
28 template <
typename MatrixType>
32 eigen_assert((
A.rows() ==
A.cols()) &&
"ONLY FOR SQUARED MATRICES");
39 for (StorageIndex
j = 0;
j <
m;
j++)
44 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it)
46 Index idx = it.index();
47 if (visited(idx) !=
j )
54 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it)
56 Index idx = it.index();
70 StorageIndex CurNz = 0;
71 for (StorageIndex
j = 0;
j <
m;
j++)
77 for (
typename MatrixType::InnerIterator it(
A,
j); it; ++it)
79 StorageIndex idx = it.index();
80 if (visited(idx) !=
j )
88 for (
typename MatrixType::InnerIterator it(At,
j); it; ++it)
90 StorageIndex idx = it.index();
102 template <
typename MatrixType>
105 StorageIndex
m = internal::convert_index<StorageIndex>(
A.cols());
117 std::cerr <<
"ERROR WHILE CALLING THE METIS PACKAGE \n";
126 for (
int j = 0;
j <
m;
j++)
idx_t idx_t idx_t idx_t idx_t * perm
Namespace containing all symbols from the Eigen library.
const IndicesType & indices() const
void operator()(const MatrixType &A, PermutationType &matperm)
void resize(Index newSize)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Matrix< StorageIndex, Dynamic, 1 > IndexVector
EIGEN_DEVICE_FUNC Derived & setConstant(Index size, const Scalar &val)
idx_t idx_t idx_t idx_t idx_t idx_t * iperm
int METIS_NodeND(idx_t *nvtxs, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *options, idx_t *perm, idx_t *iperm)
void get_symmetrized_graph(const MatrixType &A)
PermutationMatrix< Dynamic, Dynamic, StorageIndex > PermutationType
IndexVector m_innerIndices
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:33:48