MyMediaLite  3.10
Public Member Functions | Properties | List of all members
IBooleanMatrix Interface Reference

Interface for boolean matrices More...

Inheritance diagram for IBooleanMatrix:
IMatrix< T > SparseBooleanMatrix

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

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

Property Documentation

bool IsSymmetric
getinherited

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

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
getinherited

The number of columns of the matrix

The number of columns of the matrix

int NumberOfEntries
get

The number of (true) entries

int NumberOfRows
getinherited

The number of rows of the matrix

The number of rows of the matrix

T this[int x, int y]
getsetinherited

The value at (i,j)

The value at (i,j)

Parameters
xthe row ID
ythe column ID
ICollection<int> this[int x]
get

Indexer to access the rows of the matrix

Parameters
xthe row ID

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