Package ubic.gemma.core.datastructure
Class MatrixMask
java.lang.Object
ubic.gemma.core.datastructure.MatrixMask
A quasi-universal matrix mask.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicate if this mask has any column-wise masking.boolean
Indicate if this mask has any element-wise masking.boolean
Indicate if this mask has any row-wise masking.inverted()
Invert the mask of this matrix, allowing access to the previously masked elements.boolean
isColumnMasked
(int column) boolean
isMasked
(int row, int column) boolean
isRowMasked
(int row) static MatrixMask
maskColumns
(int rows, int cols, boolean[] columnMask) Mask whole columns of the given matrix.static MatrixMask
maskElements
(int rows, int cols, boolean[][] mask) Mask individual elements of the given matrix.static MatrixMask
maskElements
(int rows, int cols, int[] i, int[] j) Mask individual elements of the given matrix at the specified coordinates.static MatrixMask
maskRows
(int rows, int cols, boolean[] rowMask) Mask whole rows of the given matrix.
-
Method Details
-
maskElements
Mask individual elements of the given matrix. -
maskElements
Mask individual elements of the given matrix at the specified coordinates.This uses a sparse representation internally, which is more efficient for large matrices with few masked elements.
-
maskRows
Mask whole rows of the given matrix. -
maskColumns
Mask whole columns of the given matrix. -
hasColumnMask
public boolean hasColumnMask()Indicate if this mask has any column-wise masking. -
hasRowMask
public boolean hasRowMask()Indicate if this mask has any row-wise masking. -
hasElementMask
public boolean hasElementMask()Indicate if this mask has any element-wise masking. -
isRowMasked
public boolean isRowMasked(int row) -
isColumnMasked
public boolean isColumnMasked(int column) -
isMasked
public boolean isMasked(int row, int column) -
inverted
Invert the mask of this matrix, allowing access to the previously masked elements.
-