SymmetricMatrix< T > Class Template Reference

Class for storing dense matrices. More...

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

List of all members.

Public Member Functions

IMatrix< T > CreateMatrix (int num_rows, int num_columns)
 Create a matrix with a given number of rows and columns.
void Grow (int num_rows, int num_columns)
 Grows 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 symmetric, 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]
 The value at (i,j).

Detailed Description

template<T>
class MyMediaLite::DataType::SymmetricMatrix< T >

Class for storing dense matrices.

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

Template Parameters:
T the type of the matrix entries

Constructor & Destructor Documentation

SymmetricMatrix ( int  dim  )  [inline]

Initializes a new instance of the SymmetricMatrix class.

Parameters:
dim the number of rows and columns

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_rows the number of rows
num_columns the number of columns
Returns:
A matrix with num_rows rows and num_column columns

Implements IMatrix< T >.

void Grow ( int  num_rows,
int  num_cols 
) [inline]

Grows the matrix to the requested size, if necessary.

The new entries are filled with zeros.

Parameters:
num_rows the minimum number of rows
num_cols the minimum number of columns

Implements IMatrix< T >.

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

internal T [][] data [protected]

Data array: data is stored in columns.

int dim

Dimension, the number of rows and columns.


Property Documentation

virtual bool IsSymmetric [get]

True if the matrix is symmetric, false otherwise.

True if the matrix is symmetric, false otherwise

Implements IMatrix< T >.

int NumberOfColumns [get]

The number of columns of the matrix.

The number of columns of the matrix

Implements IMatrix< T >.

int NumberOfRows [get]

The number of rows of the matrix.

The number of rows of the matrix

Implements IMatrix< T >.

virtual T this[int i, int j] [get, set]

The value at (i,j).

The value at (i,j)

Parameters:
x the row ID
y the column ID

Implements IMatrix< T >.


The documentation for this class was generated from the following file:
Generated on Thu Apr 5 01:11:32 2012 for MyMediaLite by  doxygen 1.6.3