Package org.ejml.masks
Class DMaskPrimitive
java.lang.Object
org.ejml.masks.Mask
org.ejml.masks.DMaskPrimitive
public class DMaskPrimitive extends Mask
Mask implementation backed by a primitive array
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDMaskPrimitive.BuilderUtility class to buildDMaskPrimitive -
Field Summary
Fields Modifier and Type Field Description intnumColsNumber of columns of the wrapped matrixdoublezeroElementValue representing that the entry is not set in the mask -
Constructor Summary
Constructors Constructor Description DMaskPrimitive(double[] values, int numCols, boolean negated, double zeroElement) -
Method Summary
Modifier and Type Method Description intgetNumCols()intgetNumRows()booleanisSet(int index)booleanisSet(int row, int col)intmaxMaskedEntries()Pessimistic 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)
-