11 #ifndef EIGEN_BROWSE_MATRICES_H
12 #define EIGEN_BROWSE_MATRICES_H
43 template <
typename Scalar>
84 std::cerr <<
"Warning loadMarket failed when loading \"" << matrix_file <<
"\"" << std::endl;
96 if(lower_norm>diag_norm && upper_norm==diag_norm)
100 m_mat = tmp.template selfadjointView<Lower>();
102 else if(upper_norm>diag_norm && lower_norm==diag_norm)
106 m_mat = tmp.template selfadjointView<Upper>();
120 std::string rhs_file;
152 std::string lhs_file;
177 std::ifstream file_id(file.c_str());
178 if (!file_id.good() )
198 if (
m_curs_id->d_type == DT_DIR)
continue;
204 bool isvector,iscomplex=
false;
206 if(isvector)
continue;
209 if(internal::is_same<Scalar, std::complex<float> >::value || internal::is_same<Scalar, std::complex<double> >::value)
214 if(internal::is_same<Scalar, float>::value || internal::is_same<Scalar, double>::value)
220 std::string filename =
m_curs_id->d_name;
221 m_matname = filename.substr(0, filename.length()-4);
Iterator to browse matrices from a specified folder.
MatrixMarketIterator & operator++()
NumTraits< Scalar >::Real RealScalar
bool Fileexists(std::string file)
struct dirent * m_curs_id
void Getnextvalidmatrix()
SparseMatrix< Scalar, ColMajor > MatrixType
Matrix< Scalar, Dynamic, 1 > VectorType
MatrixMarketIterator(const std::string &folder)
Derived & setRandom(Index rows, Index cols)
constexpr void resize(Index rows, Index cols)
DiagonalReturnType diagonal()
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend