28 template <
typename MatrixType>
29 void get_symmetrized_graph(
const MatrixType& A)
32 eigen_assert((A.rows() == A.cols()) &&
"ONLY FOR SQUARED MATRICES");
34 MatrixType
At = A.transpose();
39 for (StorageIndex
j = 0;
j < m;
j++)
44 for (
typename MatrixType::InnerIterator it(A,
j); it; ++it)
46 Index idx = it.index();
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();
83 m_innerIndices(
CurNz) = idx;
88 for (
typename MatrixType::InnerIterator it(
At,
j); it; ++it)
90 StorageIndex idx = it.index();
94 m_innerIndices(
CurNz) = idx;
99 m_indexPtr(m) =
CurNz;
102 template <
typename MatrixType>
105 StorageIndex m = internal::convert_index<StorageIndex>(A.cols());
108 get_symmetrized_graph(A);
117 std::cerr <<
"ERROR WHILE CALLING THE METIS PACKAGE \n";
126 for (
int j = 0;
j < m;
j++)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
Resizes *this to a rows x cols matrix.
Definition PlainObjectBase.h:252