MyMediaLite  3.10
Public Member Functions | Properties | List of all members
IMatrix< T > Interface Template Reference

Generic interface for matrix data types More...

Inheritance diagram for IMatrix< T >:
ICorrelationMatrix IBooleanMatrix Matrix< T > SparseMatrix< T > SymmetricMatrix< T > AsymmetricCorrelationMatrix IBinaryDataCorrelationMatrix IRatingCorrelationMatrix SymmetricCorrelationMatrix SparseBooleanMatrix AsymmetricCorrelationMatrix SymmetricSparseMatrix< T > SymmetricSparseMatrix-g< float >

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 num_rows, int num_cols)
 Grows or shrinks the matrix to the requested size, if necessary
IMatrix< T > Transpose ()
 Get the transpose of the matrix, i.e. a matrix where rows and columns are interchanged

Properties

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
this[int x, int y] [get, set]
 The value at (i,j)

Detailed Description

Generic interface for matrix data types

Member Function Documentation

IMatrix<T> CreateMatrix ( int  num_rows,
int  num_columns 
)

Create a matrix with a given number of rows and columns

Parameters
num_rowsthe number of rows
num_columnsthe number of columns
Returns
A matrix with num_rows rows and num_column columns

Implemented in SparseMatrix< T >, SparseMatrix-g< float >, Matrix< T >, Matrix-g< float >, SparseBooleanMatrix, SkewSymmetricSparseMatrix, SymmetricMatrix< T >, SymmetricSparseMatrix< T >, SymmetricSparseMatrix-g< float >, and SymmetricSparseMatrix-g< int >.

void Resize ( int  num_rows,
int  num_cols 
)

Grows or shrinks the matrix to the requested size, if necessary

The new entries are filled with zeros. Obsolete entries are removed.

Parameters
num_rowsthe number of rows
num_colsthe number of columns

Implemented in Matrix< T >, Matrix-g< float >, SparseBooleanMatrix, SparseMatrix< T >, SparseMatrix-g< float >, and SymmetricMatrix< T >.

IMatrix<T> Transpose ( )

Get the transpose of the matrix, i.e. a matrix where rows and columns are interchanged

Returns
the transpose of the matrix (copy)

Implemented in SparseBooleanMatrix, SparseMatrix< T >, SparseMatrix-g< float >, Matrix< T >, Matrix-g< float >, and SymmetricMatrix< T >.

Property Documentation

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

int NumberOfColumns
get

The number of columns of the matrix

The number of columns of the matrix

int NumberOfRows
get

The number of rows of the matrix

The number of rows of the matrix

T this[int x, int y]
getset

The value at (i,j)

The value at (i,j)

Parameters
xthe row ID
ythe column ID

The documentation for this interface was generated from the following file: