summaryrefslogtreecommitdiffhomepage
path: root/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-16 11:45:13 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 11:45:13 +0100
commitbbdfe42628cc324904a49d472230c8cbbfd9e1d5 (patch)
tree0ae6a380649af4a854c88245abb1c9fa3a571cc4 /eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h
parent3e07e568a1ae478b89812d91438d75179c94ab35 (diff)
update eigen
Diffstat (limited to 'eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h')
-rw-r--r--eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h b/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h
index 41e4af4..04b7d69 100644
--- a/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h
+++ b/eigen/unsupported/Eigen/src/SparseExtra/MarketIO.h
@@ -17,8 +17,8 @@ namespace Eigen {
namespace internal
{
- template <typename Scalar>
- inline bool GetMarketLine (std::stringstream& line, Index& M, Index& N, Index& i, Index& j, Scalar& value)
+ template <typename Scalar,typename IndexType>
+ inline bool GetMarketLine (std::stringstream& line, IndexType& M, IndexType& N, IndexType& i, IndexType& j, Scalar& value)
{
line >> i >> j >> value;
i--;
@@ -30,8 +30,8 @@ namespace internal
else
return false;
}
- template <typename Scalar>
- inline bool GetMarketLine (std::stringstream& line, Index& M, Index& N, Index& i, Index& j, std::complex<Scalar>& value)
+ template <typename Scalar,typename IndexType>
+ inline bool GetMarketLine (std::stringstream& line, IndexType& M, IndexType& N, IndexType& i, IndexType& j, std::complex<Scalar>& value)
{
Scalar valR, valI;
line >> i >> j >> valR >> valI;
@@ -134,7 +134,7 @@ template<typename SparseMatrixType>
bool loadMarket(SparseMatrixType& mat, const std::string& filename)
{
typedef typename SparseMatrixType::Scalar Scalar;
- typedef typename SparseMatrixType::Index Index;
+ typedef typename SparseMatrixType::StorageIndex StorageIndex;
std::ifstream input(filename.c_str(),std::ios::in);
if(!input)
return false;
@@ -144,11 +144,11 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
bool readsizes = false;
- typedef Triplet<Scalar,Index> T;
+ typedef Triplet<Scalar,StorageIndex> T;
std::vector<T> elements;
- Index M(-1), N(-1), NNZ(-1);
- Index count = 0;
+ StorageIndex M(-1), N(-1), NNZ(-1);
+ StorageIndex count = 0;
while(input.getline(buffer, maxBuffersize))
{
// skip comments
@@ -171,7 +171,7 @@ bool loadMarket(SparseMatrixType& mat, const std::string& filename)
}
else
{
- Index i(-1), j(-1);
+ StorageIndex i(-1), j(-1);
Scalar value;
if( internal::GetMarketLine(line, M, N, i, j, value) )
{