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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intNumber of columns of the wrapped matrixfinal doubleValue representing that the entry is not set in the mask -
Constructor Summary
ConstructorsConstructorDescriptionDMaskPrimitive(double[] values, int numCols, boolean negated, double zeroElement) -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanisSet(int index) booleanisSet(int row, int col) intPessimistic estimation of entries set in the maskvoidsetIndexColumn(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:
getNumColsin classMask- Returns:
- The number of columns of the wrapped matrix
-
getNumRows
public int getNumRows()- Specified by:
getNumRowsin classMask- Returns:
- The number of rows of the wrapped matrix
-
setIndexColumn
public void setIndexColumn(int column) Description copied from class:MaskFor faster access on a specific column (on at a time) ! Only useful for sparse masks- Specified by:
setIndexColumnin classMask- Parameters:
column- column to index
-
maxMaskedEntries
public int maxMaskedEntries()Description copied from class:MaskPessimistic estimation of entries set in the mask- Specified by:
maxMaskedEntriesin classMask- Returns:
- Maximum number of set entries in mask
-
isSet
public boolean isSet(int index)
-