From 35f7829af10c61e33dd2e2a7a015058e11a11ea0 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Mar 2017 14:17:07 +0100 Subject: update --- eigen/Eigen/src/MetisSupport/MetisSupport.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'eigen/Eigen/src/MetisSupport/MetisSupport.h') diff --git a/eigen/Eigen/src/MetisSupport/MetisSupport.h b/eigen/Eigen/src/MetisSupport/MetisSupport.h index f2bbef2..4c15304 100644 --- a/eigen/Eigen/src/MetisSupport/MetisSupport.h +++ b/eigen/Eigen/src/MetisSupport/MetisSupport.h @@ -18,12 +18,12 @@ namespace Eigen { * 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 +template class MetisOrdering { public: - typedef PermutationMatrix PermutationType; - typedef Matrix IndexVector; + typedef PermutationMatrix PermutationType; + typedef Matrix IndexVector; template void get_symmetrized_graph(const MatrixType& A) @@ -36,7 +36,7 @@ public: Index TotNz = 0; IndexVector visited(m); visited.setConstant(-1); - for (int j = 0; j < m; j++) + for (StorageIndex j = 0; j < m; j++) { // Compute the union structure of of A(j,:) and At(j,:) visited(j) = j; // Do not include the diagonal element @@ -67,8 +67,8 @@ public: // Now compute the real adjacency list of each column/row visited.setConstant(-1); - Index CurNz = 0; - for (int j = 0; j < m; j++) + StorageIndex CurNz = 0; + for (StorageIndex j = 0; j < m; j++) { m_indexPtr(j) = CurNz; @@ -76,7 +76,7 @@ public: // Add the pattern of row/column j of A to A+At for (typename MatrixType::InnerIterator it(A,j); it; ++it) { - Index idx = it.index(); // Get the row index (for column major) or column index (for row major) + StorageIndex idx = it.index(); // Get the row index (for column major) or column index (for row major) if (visited(idx) != j ) { visited(idx) = j; @@ -87,7 +87,7 @@ public: //Add the pattern of row/column j of At to A+At for (typename MatrixType::InnerIterator it(At, j); it; ++it) { - Index idx = it.index(); + StorageIndex idx = it.index(); if(visited(idx) != j) { visited(idx) = j; @@ -102,7 +102,7 @@ public: template void operator() (const MatrixType& A, PermutationType& matperm) { - Index m = A.cols(); + StorageIndex m = internal::convert_index(A.cols()); // must be StorageIndex, because it is passed by address to METIS IndexVector perm(m),iperm(m); // First, symmetrize the matrix graph. get_symmetrized_graph(A); -- cgit v1.2.3