MyMediaLite  3.09
Public Member Functions | Properties
IBooleanMatrix Interface Reference

Interface for boolean matrices. More...

Inheritance diagram for IBooleanMatrix:
IMatrix< T > SparseBooleanMatrix

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.
IList< int > GetEntriesByColumn (int column_id)
 Get all true entries (row IDs) of a column.
IList< int > GetEntriesByRow (int row_id)
 Get all true entries (column IDs) of a row.
int NumEntriesByColumn (int column_id)
 Get all the number of entries in a column.
int NumEntriesByRow (int row_id)
 Get all the number of entries in a row.
int Overlap (IBooleanMatrix s)
 Get the overlap of two matrices, i.e. the number of true entries where they agree.
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.
IList< int > NonEmptyColumnIDs [get]
 The IDs of the non-empty columns in the matrix (the ones that contain at least one true entry)
IList< int > NonEmptyRowIDs [get]
 The IDs of the non-empty rows in the matrix (the ones that contain at least one true entry)
int NumberOfColumns [get]
 The number of columns of the matrix.
int NumberOfEntries [get]
 The number of (true) entries.
int NumberOfRows [get]
 The number of rows of the matrix.
this[int x, int y] [get, set]
 The value at (i,j)
ICollection< int > this[int x] [get]
 Indexer to access the rows of the matrix.

Detailed Description

Interface for boolean matrices.


Member Function Documentation

IMatrix<T> CreateMatrix ( int  num_rows,
int  num_columns 
) [inherited]

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 >, Matrix< T >, SparseBooleanMatrix, SkewSymmetricSparseMatrix, SymmetricMatrix< T >, and SymmetricSparseMatrix< T >.

IList<int> GetEntriesByColumn ( int  column_id)

Get all true entries (row IDs) of a column.

Parameters:
column_idthe column ID
Returns:
a list of row IDs

Implemented in SparseBooleanMatrix.

IList<int> GetEntriesByRow ( int  row_id)

Get all true entries (column IDs) of a row.

Parameters:
row_idthe row ID
Returns:
a list of column IDs

Implemented in SparseBooleanMatrix.

int NumEntriesByColumn ( int  column_id)

Get all the number of entries in a column.

Parameters:
column_idthe column ID
Returns:
the number of entries in column column_id

Implemented in SparseBooleanMatrix.

int NumEntriesByRow ( int  row_id)

Get all the number of entries in a row.

Parameters:
row_idthe row ID
Returns:
the number of entries in row row_id

Implemented in SparseBooleanMatrix.

int Overlap ( IBooleanMatrix  s)

Get the overlap of two matrices, i.e. the number of true entries where they agree.

Parameters:
sthe IBooleanMatrix to compare to
Returns:
the number of entries that are true in both matrices

Implemented in SparseBooleanMatrix.

void Resize ( int  num_rows,
int  num_cols 
) [inherited]

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 >, SparseBooleanMatrix, SparseMatrix< T >, and SymmetricMatrix< T >.

IMatrix<T> Transpose ( ) [inherited]

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 >, Matrix< T >, and SymmetricMatrix< T >.


Property Documentation

bool IsSymmetric [get, inherited]

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

Implemented in SparseBooleanMatrix, SkewSymmetricSparseMatrix, SymmetricSparseMatrix< T >, Matrix< T >, AsymmetricCorrelationMatrix, SymmetricCorrelationMatrix, SparseMatrix< T >, and SymmetricMatrix< T >.

IList<int> NonEmptyColumnIDs [get]

The IDs of the non-empty columns in the matrix (the ones that contain at least one true entry)

Implemented in SparseBooleanMatrix.

IList<int> NonEmptyRowIDs [get]

The IDs of the non-empty rows in the matrix (the ones that contain at least one true entry)

Implemented in SparseBooleanMatrix.

int NumberOfColumns [get, inherited]

The number of columns of the matrix.

The number of columns of the matrix

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

int NumberOfEntries [get]

The number of (true) entries.

Implemented in SparseBooleanMatrix.

int NumberOfRows [get, inherited]

The number of rows of the matrix.

The number of rows of the matrix

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

T this[int x, int y] [get, set, inherited]

The value at (i,j)

The value at (i,j)

Parameters:
xthe row ID
ythe column ID

Implemented in SparseMatrix< T >, SparseBooleanMatrix, SkewSymmetricSparseMatrix, and SymmetricSparseMatrix< T >.

ICollection<int> this[int x] [get]

Indexer to access the rows of the matrix.

Parameters:
xthe row ID

Implemented in SparseBooleanMatrix.


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