aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/MetisSupport
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-02-17 18:52:39 +0100
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2015-02-17 18:52:39 +0100
commit97a36ecba446750620c47237e16106f245a422b9 (patch)
tree74bd84243fe8c14f965f0cb3bf0a6e4f656f831e /Eigen/src/MetisSupport
parent159fb181c222afb3634006f0a620dd5b5419e924 (diff)
Suppress some remaining Index conversion warnings
Diffstat (limited to 'Eigen/src/MetisSupport')
-rw-r--r--Eigen/src/MetisSupport/MetisSupport.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Eigen/src/MetisSupport/MetisSupport.h b/Eigen/src/MetisSupport/MetisSupport.h
index f2bbef20c..4c15304ad 100644
--- a/Eigen/src/MetisSupport/MetisSupport.h
+++ b/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 <typename Index>
+template <typename StorageIndex>
class MetisOrdering
{
public:
- typedef PermutationMatrix<Dynamic,Dynamic,Index> PermutationType;
- typedef Matrix<Index,Dynamic,1> IndexVector;
+ typedef PermutationMatrix<Dynamic,Dynamic,StorageIndex> PermutationType;
+ typedef Matrix<StorageIndex,Dynamic,1> IndexVector;
template <typename MatrixType>
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 <typename MatrixType>
void operator() (const MatrixType& A, PermutationType& matperm)
{
- Index m = A.cols();
+ StorageIndex m = internal::convert_index<StorageIndex>(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);