Iterator to browse matrices from a specified folder. More...
Public Types | |
typedef SparseMatrix< Scalar, ColMajor > | MatrixType |
typedef Matrix< Scalar, Dynamic, 1 > | VectorType |
Public Member Functions | |
bool | hasrefX () |
bool | hasRhs () |
bool | isFolderValid () |
std::string & | matname () |
MatrixType & | matrix () |
MatrixMarketIterator (const std::string &folder) | |
operator bool () const | |
MatrixMarketIterator & | operator++ () |
VectorType & | refX () |
VectorType & | rhs () |
int | sym () |
~MatrixMarketIterator () | |
Protected Member Functions | |
bool | Fileexists (std::string file) |
void | Getnextvalidmatrix () |
Protected Attributes | |
struct dirent * | m_curs_id |
std::string | m_folder |
DIR * | m_folder_id |
bool | m_hasrefX |
bool | m_hasRhs |
bool | m_isvalid |
MatrixType | m_mat |
bool | m_matIsLoaded |
std::string | m_matname |
VectorType | m_refX |
VectorType | m_rhs |
int | m_sym |
Private Types | |
typedef NumTraits< Scalar >::Real | RealScalar |
Iterator to browse matrices from a specified folder.
This is used to load all the matrices from a folder. The matrices should be in Matrix Market format It is assumed that the matrices are named as matname.mtx and matname_SPD.mtx if the matrix is Symmetric and positive definite (or Hermitian) The right hand side vectors are loaded as well, if they exist. They should be named as matname_b.mtx. Note that the right hand side for a SPD matrix is named as matname_SPD_b.mtx
Sometimes a reference solution is available. In this case, it should be named as matname_x.mtx
Sample code
Scalar | The scalar type |
Definition at line 44 of file MatrixMarketIterator.h.
typedef SparseMatrix<Scalar,ColMajor> Eigen::MatrixMarketIterator< Scalar >::MatrixType |
Definition at line 49 of file MatrixMarketIterator.h.
|
private |
Definition at line 46 of file MatrixMarketIterator.h.
typedef Matrix<Scalar,Dynamic,1> Eigen::MatrixMarketIterator< Scalar >::VectorType |
Definition at line 48 of file MatrixMarketIterator.h.
|
inline |
Definition at line 52 of file MatrixMarketIterator.h.
|
inline |
Definition at line 60 of file MatrixMarketIterator.h.
|
inlineprotected |
Definition at line 175 of file MatrixMarketIterator.h.
|
inlineprotected |
Definition at line 189 of file MatrixMarketIterator.h.
|
inline |
Definition at line 170 of file MatrixMarketIterator.h.
|
inline |
Definition at line 169 of file MatrixMarketIterator.h.
|
inline |
Definition at line 171 of file MatrixMarketIterator.h.
|
inline |
Definition at line 165 of file MatrixMarketIterator.h.
|
inline |
Return the sparse matrix corresponding to the current file
Definition at line 76 of file MatrixMarketIterator.h.
|
inline |
Definition at line 73 of file MatrixMarketIterator.h.
|
inline |
Definition at line 65 of file MatrixMarketIterator.h.
|
inline |
Return a reference solution If it is not provided and if the right hand side is not available then refX is randomly generated such that A*refX = b where A and b are the matrix and the rhs. Note that when a rhs is provided, refX is not available
Definition at line 147 of file MatrixMarketIterator.h.
|
inline |
Return the right hand side corresponding to the current matrix. If the rhs file is not provided, a random rhs is generated
Definition at line 115 of file MatrixMarketIterator.h.
|
inline |
Definition at line 167 of file MatrixMarketIterator.h.
|
protected |
Definition at line 243 of file MatrixMarketIterator.h.
|
protected |
Definition at line 241 of file MatrixMarketIterator.h.
|
protected |
Definition at line 242 of file MatrixMarketIterator.h.
|
protected |
Definition at line 240 of file MatrixMarketIterator.h.
|
protected |
Definition at line 239 of file MatrixMarketIterator.h.
|
protected |
Definition at line 237 of file MatrixMarketIterator.h.
|
protected |
Definition at line 233 of file MatrixMarketIterator.h.
|
protected |
Definition at line 238 of file MatrixMarketIterator.h.
|
protected |
Definition at line 236 of file MatrixMarketIterator.h.
|
protected |
Definition at line 235 of file MatrixMarketIterator.h.
|
protected |
Definition at line 234 of file MatrixMarketIterator.h.
|
protected |
Definition at line 232 of file MatrixMarketIterator.h.