MyMediaLite  3.10
Public Member Functions | Public Attributes | Properties | List of all members
SymmetricMatrix< T > Class Template Reference

Class for storing dense matrices More...

Inheritance diagram for SymmetricMatrix< T >:
IMatrix< T >

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

Properties

virtual bool IsSymmetric [get]
int NumberOfColumns [get]
int NumberOfRows [get]
virtual T this[int i, int j] [get, set]
this[int x, int y] [get, set]
 The value at (i,j)

Detailed Description

Class for storing dense matrices

The data is stored in row-major mode. Indexes are zero-based.

Template Parameters
Tthe type of the matrix entries

Member Function Documentation

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

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

Implements IMatrix< T >.

void Resize ( int  size)
inline

Resize to the given size

Parameters
sizethe 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.

Parameters
num_rowsthe number of rows
num_colsthe number of columns

Implements IMatrix< T >.

SymmetricMatrix ( int  dim)
inline

Initializes a new instance of the SymmetricMatrix class

Parameters
dimthe number of rows and columns
IMatrix<T> Transpose ( )
inline

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

Returns
the transpose of the matrix (copy)

Implements IMatrix< T >.

Member Data Documentation

int dim

Dimension, the number of rows and columns

Property Documentation

T this[int x, int y]
getsetinherited

The value at (i,j)

The value at (i,j)

Parameters
xthe row ID
ythe column ID

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