From 5cbe6a5fbfb18c8855d78c5f43dabead3ecace9c Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Fri, 25 May 2012 17:53:37 +0200 Subject: [PATCH] Read header of Hermitian matrices --- unsupported/Eigen/src/SparseExtra/MarketIO.h | 4 ++-- unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unsupported/Eigen/src/SparseExtra/MarketIO.h b/unsupported/Eigen/src/SparseExtra/MarketIO.h index ef5dcf9f0..ddca225d7 100644 --- a/unsupported/Eigen/src/SparseExtra/MarketIO.h +++ b/unsupported/Eigen/src/SparseExtra/MarketIO.h @@ -85,7 +85,7 @@ namespace internal { header += " complex"; if(sym == Symmetric) header += " symmetric"; - else if (sym == SelfAdjoint) header += " hermitian"; + else if (sym == SelfAdjoint) header += " Hermitian"; else header += " general"; } else @@ -139,7 +139,7 @@ inline bool getMarketHeader(const std::string& filename, int& sym, bool& iscompl if(substr[2].compare("array") == 0) isvector = true; if(substr[3].compare("complex") == 0) iscomplex = true; if(substr[4].compare("symmetric") == 0) sym = Symmetric; - else if (substr[4].compare("hermitian") == 0) sym = SelfAdjoint; + else if (substr[4].compare("Hermitian") == 0) sym = SelfAdjoint; return true; } diff --git a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h index 5a50bc5bc..e04481c01 100644 --- a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h +++ b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h @@ -208,7 +208,7 @@ class MatrixMarketIterator // Find if the matrix is SPD size_t found = m_matname.find("SPD"); - if( (found!=std::string::npos) && (m_sym == Symmetric) ) + if( (found!=std::string::npos) && (m_sym != NonSymmetric) ) m_sym = SPD; m_isvalid = true;