11 #ifndef EIGEN_BROWSE_MATRICES_H 12 #define EIGEN_BROWSE_MATRICES_H 41 template <
typename Scalar>
54 std::cerr <<
"The provided Matrix folder could not be opened \n\n";
93 m_mat = B.template selfadjointView<Lower>();
106 std::string rhs_file;
138 std::string lhs_file;
160 std::ifstream file_id(file.c_str());
161 if (!file_id.good() )
181 if (
m_curs_id->d_type == DT_DIR)
continue;
187 bool isvector,iscomplex=
false;
189 if(isvector)
continue;
203 std::string filename =
m_curs_id->d_name;
204 m_matname = filename.substr(0, filename.length()-4);
MatrixMarketIterator(const std::string folder)
bool loadMarketVector(VectorType &vec, const std::string &filename)
struct dirent * m_curs_id
Matrix< Scalar, Dynamic, 1 > VectorType
bool Fileexists(std::string file)
SparseMatrix< Scalar, ColMajor > MatrixType
iterative scaling algorithm to equilibrate rows and column norms in matrices
MatrixMarketIterator & operator++()
bool getMarketHeader(const std::string &filename, int &sym, bool &iscomplex, bool &isvector)
EIGEN_STRONG_INLINE void resize(Index nbRows, Index nbCols)
void Getnextvalidmatrix()
Iterator to browse matrices from a specified folder.
bool loadMarket(SparseMatrixType &mat, const std::string &filename)
Derived & setRandom(Index size)