mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Read header of Hermitian matrices
This commit is contained in:
parent
2fecd818c4
commit
5cbe6a5fbf
@ -85,7 +85,7 @@ namespace internal
|
|||||||
{
|
{
|
||||||
header += " complex";
|
header += " complex";
|
||||||
if(sym == Symmetric) header += " symmetric";
|
if(sym == Symmetric) header += " symmetric";
|
||||||
else if (sym == SelfAdjoint) header += " hermitian";
|
else if (sym == SelfAdjoint) header += " Hermitian";
|
||||||
else header += " general";
|
else header += " general";
|
||||||
}
|
}
|
||||||
else
|
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[2].compare("array") == 0) isvector = true;
|
||||||
if(substr[3].compare("complex") == 0) iscomplex = true;
|
if(substr[3].compare("complex") == 0) iscomplex = true;
|
||||||
if(substr[4].compare("symmetric") == 0) sym = Symmetric;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ class MatrixMarketIterator
|
|||||||
|
|
||||||
// Find if the matrix is SPD
|
// Find if the matrix is SPD
|
||||||
size_t found = m_matname.find("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_sym = SPD;
|
||||||
|
|
||||||
m_isvalid = true;
|
m_isvalid = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user