Package org.ejml.masks
Class DMaskPrimitive
java.lang.Object
org.ejml.masks.Mask
org.ejml.masks.DMaskPrimitive
Mask implementation backed by a primitive array
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
Number of columns of the wrapped matrixfinal double
Value representing that the entry is not set in the mask -
Constructor Summary
ConstructorDescriptionDMaskPrimitive
(double[] values, int numCols, boolean negated, double zeroElement) -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
isSet
(int index) boolean
isSet
(int row, int col) int
Pessimistic estimation of entries set in the maskvoid
setIndexColumn
(int column) 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
-
numCols
public final int numColsNumber of columns of the wrapped matrix -
zeroElement
public final double zeroElementValue representing that the entry is not set in the mask
-
-
Constructor Details
-
DMaskPrimitive
public DMaskPrimitive(double[] values, int numCols, boolean negated, double zeroElement)
-
-
Method Details
-
isSet
public boolean isSet(int row, int col) -
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 column) 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:
column
- 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
-
isSet
public boolean isSet(int index)
-