#include <Matrix_Pointers.hxx>
Inheritance diagram for Seldon::Matrix_Pointers< T, Prop, Storage, Allocator >:

Public Types | |
| typedef Allocator::value_type | value_type |
| typedef Allocator::pointer | pointer |
| typedef Allocator::const_pointer | const_pointer |
| typedef Allocator::reference | reference |
| typedef Allocator::const_reference | const_reference |
Public Member Functions | |
| Matrix_Pointers () | |
| Default constructor. | |
| Matrix_Pointers (int i, int j) | |
| Main constructor. | |
| ~Matrix_Pointers () | |
| Destructor. | |
| void | Clear () |
| Clears the matrix. | |
| int | GetDataSize () const |
| Returns the number of elements stored in memory. | |
| void | Reallocate (int i, int j) |
| Reallocates memory to resize the matrix. | |
| void | SetData (int i, int j, pointer data) |
| void | Nullify () |
| Clears the matrix without releasing memory. | |
| reference | operator() (int i, int j) |
| Access operator. | |
| const_reference | operator() (int i, int j) const |
| Access operator. | |
| reference | Val (int i, int j) |
| Access operator. | |
| const_reference | Val (int i, int j) const |
| Access operator. | |
| reference | operator[] (int i) |
| Access to elements of the data array. | |
| const_reference | operator[] (int i) const |
| Access to elements of the data array. | |
| Matrix_Pointers< T, Prop, Storage, Allocator > & | operator= (const Matrix_Pointers< T, Prop, Storage, Allocator > &A) |
| Duplicates a matrix (assignment operator). | |
| void | Copy (const Matrix_Pointers< T, Prop, Storage, Allocator > &A) |
| Duplicates a matrix. | |
| void | Zero () |
| Sets all elements to zero. | |
| void | SetIdentity () |
| Sets the current matrix to the identity. | |
| void | Fill () |
| Fills the matrix the matrix with 0, 1, 2, ... | |
| template<class T0> | |
| void | Fill (const T0 &x) |
| Fills the matrix with a given value. | |
| template<class T0> | |
| Matrix_Pointers< T, Prop, Storage, Allocator > & | operator= (const T0 &x) |
| Fills the matrix with a given value. | |
| void | FillRand () |
| Fills the matrix randomly. | |
| void | Print () const |
| Displays the matrix on the standard output. | |
| void | Print (int a, int b, int m, int n) const |
| Displays a sub-matrix on the standard output. | |
| void | Print (int l) const |
| Displays a square sub-matrix on the standard output. | |
| value_type | GetNormInf () const |
| Returns the maximum (in absolute value) of the matrix. | |
| void | Write (string FileName) const |
| Writes the matrix in a file. | |
| void | Write (ofstream &FileStream) const |
| Writes the matrix to an output stream. | |
| void | WriteText (string FileName) const |
| Writes the matrix in a file. | |
| void | WriteText (ofstream &FileStream) const |
| Writes the matrix to an output stream. | |
| void | Read (string FileName) |
| Reads the matrix from a file. | |
| void | Read (ifstream &FileStream) |
| Reads the matrix from an input stream. | |
Protected Attributes | |
| pointer * | me_ |
|
|||||||||
|
Default constructor. On exit, the matrix is an empty 0x0 matrix. |
|
||||||||||||||||
|
Main constructor. Builds a i x j full matrix.
|
|
|||||||||
|
Clears the matrix. Destructs the matrix.
|
|
||||||||||
|
Duplicates a matrix.
|
|
||||||||||||||
|
Fills the matrix with a given value.
|
|
|||||||||
|
Fills the matrix the matrix with 0, 1, 2, ... On exit, the matrix is filled with 0, 1, 2, 3, ... The order of those numbers depends on the storage. |
|
|||||||||
|
Fills the matrix randomly.
|
|
|||||||||
|
Returns the number of elements stored in memory. Returns the number of elements stored in memory, i.e. the number of rows multiplied by the number of columns because the matrix is full.
|
|
|||||||||
|
Returns the maximum (in absolute value) of the matrix.
|
|
|||||||||
|
Clears the matrix without releasing memory. On exit, the matrix is empty and the memory has not been released. It is useful for low level manipulations on a Matrix instance.
|
|
||||||||||||||||
|
Access operator. Returns the value of element (i, j).
|
|
||||||||||||||||
|
Access operator. Returns the value of element (i, j).
|
|
||||||||||||||
|
Fills the matrix with a given value.
Reimplemented in Seldon::Matrix< T, Prop, ColMajor, Allocator >, and Seldon::Matrix< T, Prop, RowMajor, Allocator >. |
|
||||||||||
|
Duplicates a matrix (assignment operator).
|
|
||||||||||
|
Access to elements of the data array. Provides a direct access to the data array.
|
|
||||||||||
|
Access to elements of the data array. Provides a direct access to the data array.
|
|
||||||||||
|
Displays a square sub-matrix on the standard output. The sub-matrix is defined by its bottom-right corner (l, l). So, elements with indices in [0, 0] x [l, l] are displayed on the standard output, in text format. Each row is displayed on a single line and elements of a row are delimited by tabulations.
|
|
||||||||||||||||||||||||
|
Displays a sub-matrix on the standard output. The sub-matrix is defined by its upper-left corner (a, b) and its bottom-right corner (m, n). So, elements with indices in [a, m] x [b, n] are displayed on the standard output, in text format. Each row is displayed on a single line and elements of a row are delimited by tabulations.
|
|
|||||||||
|
Displays the matrix on the standard output. Displays elements on the standard output, in text format. Each row is displayed on a single line and elements of a row are delimited by tabulations. |
|
||||||||||
|
Reads the matrix from an input stream. Reads a matrix in binary format from an input stream. The number of rows (integer) and the number of columns (integer) are read, and matrix elements are then read in the same order as it should be in memory (e.g. row-major storage).
|
|
||||||||||
|
Reads the matrix from a file. Reads a matrix stored in binary format in a file. The number of rows (integer) and the number of columns (integer) are read, and matrix elements are then read in the same order as it should be in memory (e.g. row-major storage).
|
|
||||||||||||||||
|
Reallocates memory to resize the matrix. On exit, the matrix is a i x j matrix.
|
|
||||||||||||||||||||
|
The matrix is first cleared (memory is freed). The matrix is then resized to a i x j matrix, and the data array of the matrix is set to 'data'. 'data' elements are not duplicated: the new data array of the matrix is the 'data' array. It is useful to create a matrix from pre-existing data.
|
|
|||||||||
|
Sets the current matrix to the identity.
|
|
||||||||||||||||
|
Access operator. Returns the value of element (i, j).
|
|
||||||||||||||||
|
Access operator. Returns the value of element (i, j).
|
|
||||||||||
|
Writes the matrix to an output stream. Writes the matrix to an output stream in binary format. The number of rows (integer) and the number of columns (integer) are written, and matrix elements are then written in the same order as in memory (e.g. row-major storage).
|
|
||||||||||
|
Writes the matrix in a file. Stores the matrix in a file in binary format. The number of rows (integer) and the number of columns (integer) are written, and matrix elements are then written in the same order as in memory (e.g. row-major storage).
|
|
||||||||||
|
Writes the matrix to an output stream. Writes the matrix to an output stream in text format. Only matrix elements are written (not dimensions). Each row is written on a single line and elements of a row are delimited by tabulations.
|
|
||||||||||
|
Writes the matrix in a file. Stores the matrix in a file in text format. Only matrix elements are written (not dimensions). Each row is written on a single line and elements of a row are delimited by tabulations.
|
|
|||||||||
|
Sets all elements to zero.
|
1.4.0