org.mymedialite.datatype
Interface IBooleanMatrix

All Superinterfaces:
IMatrix<java.lang.Boolean>
All Known Implementing Classes:
SparseBooleanMatrix, SparseBooleanMatrixBinarySearch, SparseBooleanMatrixStatic

public interface IBooleanMatrix
extends IMatrix<java.lang.Boolean>

Interface for boolean matrices.


Method Summary
 IntCollection get(int x)
          Get a row of the matrix.
 IntList getEntriesByColumn(int column_id)
          Get all true entries (row IDs) of a column.
 IntList getEntriesByRow(int row_id)
          Get all true entries (column IDs) of a row.
 IntCollection nonEmptyColumnIDs()
          The IDs of the non-empty columns in the matrix (the ones that contain at least one true entry).
 IntCollection nonEmptyRowIDs()
          The IDs of the non-empty rows in the matrix (the ones that contain at least one true entry).
 int numberOfEntries()
          The number of (true) entries.
 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.
 
Methods inherited from interface org.mymedialite.datatype.IMatrix
createMatrix, get, grow, isSymmetric, numberOfColumns, numberOfRows, set, transpose
 

Method Detail

get

IntCollection get(int x)
Get a row of the matrix.

Parameters:
x - the row ID

numberOfEntries

int numberOfEntries()
The number of (true) entries.


nonEmptyRowIDs

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


nonEmptyColumnIDs

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


getEntriesByRow

IntList getEntriesByRow(int row_id)
Get all true entries (column IDs) of a row.

Parameters:
row_id - the row ID
Returns:
a list of column IDs

numEntriesByRow

int numEntriesByRow(int row_id)
Get all the number of entries in a row.

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

getEntriesByColumn

IntList getEntriesByColumn(int column_id)
Get all true entries (row IDs) of a column.

Parameters:
column_id - the column ID
Returns:
a list of row IDs

numEntriesByColumn

int numEntriesByColumn(int column_id)
Get all the number of entries in a column.

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

overlap

int overlap(IBooleanMatrix s)
Get the overlap of two matrices, i.e. the number of true entries where they agree.

Parameters:
s - the to compare to
Returns:
the number of entries that are true in both matrices