9 #ifndef METIS_SUPPORT_H    10 #define METIS_SUPPORT_H    21 template <
typename Index>
    28   template <
typename MatrixType>
    32     eigen_assert((A.rows() == A.cols()) && 
"ONLY FOR SQUARED MATRICES");
    34     MatrixType At = A.transpose(); 
    37     IndexVector visited(m); 
    39     for (
int 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(); 
    71     for (
int j = 0; j < m; j++)
    77       for (
typename MatrixType::InnerIterator it(A,j); it; ++it)
    79         Index idx = it.index(); 
    80         if (visited(idx) != j ) 
    88       for (
typename MatrixType::InnerIterator it(At, j); it; ++it)
    90         Index idx = it.index(); 
   102   template <
typename MatrixType>
   103   void operator() (
const MatrixType& A, PermutationType& matperm)
   106      IndexVector perm(m),iperm(m); 
   114     if(output_error != METIS_OK) 
   117      std::cerr << 
"ERROR WHILE CALLING THE METIS PACKAGE \n"; 
   126      for (
int j = 0; j < m; j++)
   127        matperm.
indices()(iperm(j)) = j;
 
void get_symmetrized_graph(const MatrixType &A)
EIGEN_STRONG_INLINE void resize(Index nbRows, Index nbCols)
PermutationMatrix< Dynamic, Dynamic, Index > PermutationType
Derived & setConstant(Index size, const Scalar &value)
EIGEN_STRONG_INLINE const Scalar * data() const 
Matrix< Index, Dynamic, 1 > IndexVector
const IndicesType & indices() const 
IndexVector m_innerIndices
void operator()(const MatrixType &A, PermutationType &matperm)
void resize(Index newSize)