Package org.ejml.masks
Class DMaskSparse
java.lang.Object
org.ejml.masks.Mask
org.ejml.masks.DMaskSparse
Mask implementation backed by a matrix in CSC format
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DMatrixSparseCSC
final double
Value representing that the entry is not set in the mask -
Constructor Summary
ConstructorDescriptionDMaskSparse
(DMatrixSparseCSC matrix, boolean negated, double zeroElement, @Nullable IGrowArray gw, boolean indexFirstColumn) -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
isSet
(int idx) boolean
isSet
(int row, int col) int
Pessimistic estimation of entries set in the maskvoid
setIndexColumn
(int col) For faster access on a specific column (on at a time) ! Only useful for sparse masksMethods inherited from class org.ejml.masks.Mask
compatible, print
-
Field Details
-
matrix
-
zeroElement
public final double zeroElementValue representing that the entry is not set in the mask
-
-
Constructor Details
-
DMaskSparse
public DMaskSparse(DMatrixSparseCSC matrix, boolean negated, double zeroElement, @Nullable @Nullable IGrowArray gw, boolean indexFirstColumn)
-
-
Method Details
-
isSet
public boolean isSet(int row, int col) -
isSet
public boolean isSet(int idx) -
getNumCols
public int getNumCols()- Specified by:
getNumCols
in classMask
- Returns:
- The number of columns of the wrapped matrix
-
getNumRows
public int getNumRows()- Specified by:
getNumRows
in classMask
- Returns:
- The number of rows of the wrapped matrix
-
setIndexColumn
public void setIndexColumn(int col) Description copied from class:Mask
For faster access on a specific column (on at a time) ! Only useful for sparse masks- Specified by:
setIndexColumn
in classMask
- Parameters:
col
- column to index
-
maxMaskedEntries
public int maxMaskedEntries()Description copied from class:Mask
Pessimistic estimation of entries set in the mask- Specified by:
maxMaskedEntries
in classMask
- Returns:
- Maximum number of set entries in mask
-