|
MyMediaLite
3.08
|
Class for storing dense matrices. More...
Public Member Functions | |
| IMatrix< T > | CreateMatrix (int num_rows, int num_columns) |
| Create a matrix with a given number of rows and columns. | |
| void | Resize (int size) |
| Resize to the given size. | |
| void | Resize (int num_rows, int num_columns) |
| Grows or shrinks the matrix to the requested size, if necessary. | |
| SymmetricMatrix (int dim) | |
| Initializes a new instance of the SymmetricMatrix class. | |
| IMatrix< T > | Transpose () |
| Get the transpose of the matrix, i.e. a matrix where rows and columns are interchanged. | |
Public Attributes | |
| int | dim |
| Dimension, the number of rows and columns. | |
Protected Attributes | |
| internal T[][] | data |
| Data array: data is stored in columns. | |
Properties | |
| virtual bool | IsSymmetric [get] |
| True if the matrix is stored in a symmetric manner, false otherwise. | |
| int | NumberOfColumns [get] |
| The number of columns of the matrix. | |
| int | NumberOfRows [get] |
| The number of rows of the matrix. | |
| virtual T | this[int i, int j] [get, set] |
| T | this[int x, int y] [get, set] |
| The value at (i,j) | |
Class for storing dense matrices.
The data is stored in row-major mode. Indexes are zero-based.
| T | the type of the matrix entries |
| IMatrix<T> CreateMatrix | ( | int | num_rows, |
| int | num_columns | ||
| ) | [inline] |
Create a matrix with a given number of rows and columns.
| num_rows | the number of rows |
| num_columns | the number of columns |
Implements IMatrix< T >.
| void Resize | ( | int | size | ) | [inline] |
Resize to the given size.
| size | the size |
| void Resize | ( | int | num_rows, |
| int | num_cols | ||
| ) | [inline] |
Grows or shrinks the matrix to the requested size, if necessary.
The new entries are filled with zeros. Obsolete entries are removed.
| num_rows | the number of rows |
| num_cols | the number of columns |
Implements IMatrix< T >.
| SymmetricMatrix | ( | int | dim | ) | [inline] |
Initializes a new instance of the SymmetricMatrix class.
| dim | the number of rows and columns |
Get the transpose of the matrix, i.e. a matrix where rows and columns are interchanged.
Implements IMatrix< T >.
| int dim |
Dimension, the number of rows and columns.
virtual bool IsSymmetric [get] |
True if the matrix is stored in a symmetric manner, false otherwise.
Also true for skew symmetric matrices that exploit this property in order to save memory
Implements IMatrix< T >.
int NumberOfColumns [get] |
int NumberOfRows [get] |
T this[int x, int y] [get, set, inherited] |
The value at (i,j)
The value at (i,j)
| x | the row ID |
| y | the column ID |
Implemented in SparseMatrix< T >, SparseBooleanMatrix, SkewSymmetricSparseMatrix, and SymmetricSparseMatrix< T >.
1.7.6.1