Row-major matrix collection class. More...
#include <MatrixCollection.hxx>
Public Types | |
typedef T | value_type |
typedef Prop | property |
typedef RowMajorCollection | storage |
typedef Allocator | allocator |
typedef T::pointer | pointer |
typedef T::const_pointer | const_pointer |
typedef T::reference | reference |
typedef T::const_reference | const_reference |
typedef T | matrix_type |
typedef matrix_type * | matrix_pointer |
typedef const matrix_type * | const_matrix_pointer |
typedef matrix_type & | matrix_reference |
typedef const matrix_type & | const_matrix_reference |
typedef Matrix< matrix_type, Prop, RowMajor, NewAlloc< T > > | collection_type |
typedef const collection_type | const_collection_type |
typedef collection_type & | collection_reference |
typedef const collection_type & | const_collection_reference |
Public Member Functions | |
Matrix () | |
Default constructor. | |
Matrix (int i, int j) | |
Main constructor. | |
void | Clear () |
void | Nullify () |
void | Nullify (int i, int j) |
void | Deallocate () |
int | GetM () const |
Returns the number of rows. | |
int | GetM (int i) const |
int | GetM (const Seldon::SeldonTranspose &status) const |
Returns the number of rows of the matrix possibly transposed. | |
int | GetMmatrix () const |
int | GetN () const |
Returns the number of columns. | |
int | GetN (int j) const |
int | GetN (const Seldon::SeldonTranspose &status) const |
Returns the number of columns of the matrix possibly transposed. | |
int | GetNmatrix () const |
int | GetSize () const |
Returns the number of elements in the matrix. | |
int | GetDataSize () const |
void | Reallocate (int i, int j) |
void | SetMatrix (int m, int n, const Matrix< T0, Prop0, Storage0, Allocator0 > &) |
void | SetMatrix (int m, int n, const Matrix< T0, Prop0, RowSparse, Allocator0 > &) |
matrix_reference | GetMatrix (int i, int j) |
const_matrix_reference | GetMatrix (int i, int j) const |
value_type | operator() (int i, int j) const |
void | Copy (const MatrixCollection< T, Prop, RowMajor, Allocator > &A) |
void | Print () const |
void | Print (int m, int n) const |
void | Write (string FileName, bool with_size) const |
void | Write (ostream &FileStream, bool with_size) const |
void | WriteText (string FileName) const |
void | WriteText (ostream &FileStream) const |
void | Read (string FileName) |
void | Read (istream &FileStream) |
pointer | GetData () const |
Returns a pointer to the data array. | |
const_pointer | GetDataConst () const |
Returns a const pointer to the data array. | |
void * | GetDataVoid () const |
Returns a pointer of type "void*" to the data array. | |
const void * | GetDataConstVoid () const |
Returns a pointer of type "const void*" to the data array. | |
Allocator & | GetAllocator () |
Returns the allocator of the matrix. | |
Protected Attributes | |
int | nz_ |
Number of non-zero elements. | |
int | Mmatrix_ |
Number of rows of matrices. | |
int | Nmatrix_ |
Number of columns of matrices. | |
Vector< int, VectFull, CallocAlloc< int > > | Mlocal_ |
Number of rows in the underlying matrices. | |
Vector< int, VectFull, CallocAlloc< int > > | Mlocal_sum_ |
Cumulative number of rows in the underlying matrices. | |
Vector< int, VectFull, CallocAlloc< int > > | Nlocal_ |
Number of columns in the underlying matrices. | |
Vector< int, VectFull, CallocAlloc< int > > | Nlocal_sum_ |
Cumulative number of columns in the underlying matrices. | |
collection_type | matrix_ |
Pointers of the underlying matrices. | |
int | m_ |
int | n_ |
pointer | data_ |
Static Protected Attributes | |
static Allocator | allocator_ |
Row-major matrix collection class.
Definition at line 161 of file MatrixCollection.hxx.
Seldon::Matrix< T, Prop, RowMajorCollection, Allocator >::Matrix | ( | ) | [inline] |
Default constructor.
On exit, the matrix is an empty 0x0 matrix.
Definition at line 892 of file MatrixCollection.cxx.
Seldon::Matrix< T, Prop, RowMajorCollection, Allocator >::Matrix | ( | int | i, | |
int | j | |||
) | [inline] |
Main constructor.
Builds a i x j collection matrix.
[in] | i | number of rows of matrices. |
[in] | j | number of columns of matrices. |
Definition at line 904 of file MatrixCollection.cxx.
Allocator & Seldon::Matrix_Base< T, Allocator >::GetAllocator | ( | ) | [inherited] |
Returns the allocator of the matrix.
Definition at line 258 of file Matrix_Base.cxx.
Matrix_Base< T, Allocator >::pointer Seldon::Matrix_Base< T, Allocator >::GetData | ( | ) | const [inherited] |
Returns a pointer to the data array.
Returns a pointer to data, i.e. the data array 'data_'.
Definition at line 208 of file Matrix_Base.cxx.
Matrix_Base< T, Allocator >::const_pointer Seldon::Matrix_Base< T, Allocator >::GetDataConst | ( | ) | const [inherited] |
Returns a const pointer to the data array.
Returns a const pointer to data, i.e. the data array 'data_'.
Definition at line 221 of file Matrix_Base.cxx.
const void * Seldon::Matrix_Base< T, Allocator >::GetDataConstVoid | ( | ) | const [inherited] |
Returns a pointer of type "const void*" to the data array.
Returns a pointer of type "const void*" to data, i.e. the data array 'data_'.
Definition at line 247 of file Matrix_Base.cxx.
void * Seldon::Matrix_Base< T, Allocator >::GetDataVoid | ( | ) | const [inherited] |
Returns a pointer of type "void*" to the data array.
Returns a pointer of type "void*" to data, i.e. the data array 'data_'.
Definition at line 234 of file Matrix_Base.cxx.
int Seldon::MatrixCollection< T, Prop, RowMajor , Allocator >::GetM | ( | ) | const [inherited] |
Returns the number of rows.
Reimplemented from Seldon::Matrix_Base< T, Allocator >.
int Seldon::Matrix_Base< T, Allocator >::GetM | ( | const Seldon::SeldonTranspose & | status | ) | const [inherited] |
Returns the number of rows of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.
Definition at line 130 of file Matrix_Base.cxx.
int Seldon::MatrixCollection< T, Prop, RowMajor , Allocator >::GetN | ( | ) | const [inherited] |
Returns the number of columns.
Reimplemented from Seldon::Matrix_Base< T, Allocator >.
int Seldon::Matrix_Base< T, Allocator >::GetN | ( | const Seldon::SeldonTranspose & | status | ) | const [inherited] |
Returns the number of columns of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Reimplemented in Seldon::SubMatrix_Base< T, Prop, M, Allocator >.
Definition at line 145 of file Matrix_Base.cxx.
int Seldon::MatrixCollection< T, Prop, RowMajor , Allocator >::GetSize | ( | ) | const [inherited] |
Returns the number of elements stored in memory.
Reimplemented from Seldon::Matrix_Base< T, Allocator >.