#include <inmost_sparse.h>
|
| Matrix (std::string _name="", INMOST_DATA_ENUM_TYPE start=0, INMOST_DATA_ENUM_TYPE end=0, INMOST_MPI_Comm _comm=INMOST_MPI_COMM_WORLD) |
|
| Matrix (const Matrix &other) |
|
Matrix & | operator= (Matrix const &other) |
|
| ~Matrix () |
|
Row & | operator[] (INMOST_DATA_ENUM_TYPE i) |
| Return reference to i-th Row of the matrix. More...
|
|
const Row & | operator[] (INMOST_DATA_ENUM_TYPE i) const |
| Return reference to i-th Row of the matrix. More...
|
|
INMOST_DATA_ENUM_TYPE | Size () const |
| Return the total number of rows in the matrix. More...
|
|
bool | Empty () const |
|
iterator | Begin () |
|
iterator | End () |
|
const_iterator | Begin () const |
|
const_iterator | End () const |
|
void | SetInterval (INMOST_DATA_ENUM_TYPE start, INMOST_DATA_ENUM_TYPE end) |
| Set the start and the end row numbers of the distributed matrix interval. More...
|
|
void | GetInterval (INMOST_DATA_ENUM_TYPE &start, INMOST_DATA_ENUM_TYPE &end) const |
| Get the start and the end row numbers of the distributed matrix interval. More...
|
|
void | ShiftInterval (INMOST_DATA_ENUM_TYPE shift) |
|
INMOST_DATA_ENUM_TYPE | GetFirstIndex () const |
| Get the first row index of the distributed matrix interval. More...
|
|
INMOST_MPI_Comm | GetCommunicator () const |
| Get the communicator which the matrix is associated with. More...
|
|
void | MoveRows (INMOST_DATA_ENUM_TYPE from, INMOST_DATA_ENUM_TYPE to, INMOST_DATA_ENUM_TYPE size) |
|
void | Swap (Matrix &other) |
|
void | MatVec (INMOST_DATA_REAL_TYPE alpha, Vector &x, INMOST_DATA_REAL_TYPE beta, Vector &y) const |
|
void | MatVecTranspose (INMOST_DATA_REAL_TYPE alpha, Vector &x, INMOST_DATA_REAL_TYPE beta, Vector &y) const |
|
void | Clear () |
| Clear all data of the matrix. More...
|
|
void | Load (std::string file, INMOST_DATA_ENUM_TYPE beg=ENUMUNDEF, INMOST_DATA_ENUM_TYPE end=ENUMUNDEF) |
|
void | Save (std::string file) |
|
bool & | isParallel () |
| Check that matrix is in parallel state. More...
|
|
std::string | GetName () |
| Get the matrix name specified in the main constructor. More...
|
|
Class to store the distributed sparse matrix by compressed rows. The format used to store sparse matrix is analogous to Compressed Row Storage format (CRS).
- See Also
- http://netlib.org/linalg/html_templates/node91.html
Definition at line 244 of file inmost_sparse.h.
Main constructor of the Matrix class.
- Parameters
-
_name | Name of the matrix, empty string by default. |
start | Start of the local data interval. |
end | End of the local data interval. |
_comm | Communicator for parallel data exchanges, MPI_COMM_WORLD by default. |
INMOST::Sparse::Matrix::Matrix |
( |
const Matrix & |
other | ) |
|
INMOST::Sparse::Matrix::~Matrix |
( |
| ) |
|
iterator INMOST::Sparse::Matrix::Begin |
( |
| ) |
|
|
inline |
void INMOST::Sparse::Matrix::Clear |
( |
| ) |
|
|
inline |
bool INMOST::Sparse::Matrix::Empty |
( |
| ) |
const |
|
inline |
iterator INMOST::Sparse::Matrix::End |
( |
| ) |
|
|
inline |
Get the communicator which the matrix is associated with.
Definition at line 284 of file inmost_sparse.h.
Get the first row index of the distributed matrix interval.
Definition at line 282 of file inmost_sparse.h.
Get the start and the end row numbers of the distributed matrix interval.
Definition at line 279 of file inmost_sparse.h.
std::string INMOST::Sparse::Matrix::GetName |
( |
| ) |
|
|
inline |
Get the matrix name specified in the main constructor.
Definition at line 315 of file inmost_sparse.h.
bool& INMOST::Sparse::Matrix::isParallel |
( |
| ) |
|
|
inline |
Load the matrix from a single data file in MTX format using the specified interval. If interval is not specified, then it will be automatically constructed, with the about equal block size (the last block may has larger dimension).
Matrix-vector product of the form: y = alpha*A*x + beta * y.
- Parameters
-
Matrix-vector product with transposed matrix of the form: y = alpha*A^T*x + beta * y.
- Parameters
-
Matrix& INMOST::Sparse::Matrix::operator= |
( |
Matrix const & |
other | ) |
|
void INMOST::Sparse::Matrix::Save |
( |
std::string |
file | ) |
|
Set the start and the end row numbers of the distributed matrix interval.
Definition at line 277 of file inmost_sparse.h.
Return the total number of rows in the matrix.
Definition at line 270 of file inmost_sparse.h.
void INMOST::Sparse::Matrix::Swap |
( |
Matrix & |
other | ) |
|
|
inline |
The documentation for this class was generated from the following file: