Package org.apache.sysds.runtime.data
Class DenseBlockBool
- java.lang.Object
- 
- org.apache.sysds.runtime.data.DenseBlock
- 
- org.apache.sysds.runtime.data.DenseBlockDRB
- 
- org.apache.sysds.runtime.data.DenseBlockBool
 
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class DenseBlockBool extends DenseBlockDRB - See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.data.DenseBlockDenseBlock.Type
 
- 
 - 
Constructor SummaryConstructors Constructor Description DenseBlockBool(int[] dims)DenseBlockBool(int[] dims, boolean[] data)DenseBlockBool(int[] dims, BitSet data)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longcapacity()Get the total length of allocated blocks.doubleget(int[] ix)Get the value of a given celldoubleget(int r, int c)Get the value for a given row and column.BitSetgetData()longgetLong(int[] ix)Get the value of a given cell as longStringgetString(int[] ix)Get the value of a given cell as a Stringvoidincr(int r, int c)Increments the given value for a given row and column.voidincr(int r, int c, double delta)Increments the given value for a given row and column by delta.intindex(int r)Get the block index for a given row.booleanisNumeric()Indicates if the dense block is numeric.booleanisNumeric(Types.ValueType vt)Indicates if the dense block is a specific numeric value type.voidreset(int rlen, int[] odims, double v)Resets the dense block by setting the given value.DenseBlockset(int[] ix, double v)Set the specified cell to the given value.DenseBlockset(int[] ix, long v)Set the specified cell to the given value.DenseBlockset(int[] ix, String v)Set the specified cell to the given value.DenseBlockset(int r, double[] v)Copy the given vector into the given row.DenseBlockset(int r, int c, double v)Set the given value for a given row and column.DenseBlockset(int rl, int ru, int cl, int cu, DenseBlock db)Copy the given dense block into the specified index range.DenseBlockset(String s)Set the given string for the entire dense block (fill).DenseBlockset(DenseBlock db)Copy the given dense block.double[]values(int r)Get the allocated block for the given row.double[]valuesAt(int bix)Get an allocated block.- 
Methods inherited from class org.apache.sysds.runtime.data.DenseBlockDRBblockSize, blockSize, countNonZeros, countNonZeros, countNonZeros, isContiguous, isContiguous, numBlocks, pos, pos, pos, set, set, size
 - 
Methods inherited from class org.apache.sysds.runtime.data.DenseBlockestimateMemory, getCumODims, getDim, getNextIndexes, numDims, numRows, reset, reset, reset, reset, reset, reset, set, set, setDims, size, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
DenseBlockBoolpublic DenseBlockBool(int[] dims) 
 - 
DenseBlockBoolpublic DenseBlockBool(int[] dims, BitSet data)
 - 
DenseBlockBoolpublic DenseBlockBool(int[] dims, boolean[] data)
 
- 
 - 
Method Detail- 
getDatapublic BitSet getData() 
 - 
isNumericpublic boolean isNumeric() Description copied from class:DenseBlockIndicates if the dense block is numeric.- Specified by:
- isNumericin class- DenseBlock
- Returns:
- true if numeric (FP, INT, BOOLEAN)
 
 - 
isNumericpublic boolean isNumeric(Types.ValueType vt) Description copied from class:DenseBlockIndicates if the dense block is a specific numeric value type.- Specified by:
- isNumericin class- DenseBlock
- Parameters:
- vt- value type to check
- Returns:
- true if numeric and of value type vt
 
 - 
resetpublic void reset(int rlen, int[] odims, double v)Description copied from class:DenseBlockResets the dense block by setting the given value.- Overrides:
- resetin class- DenseBlockDRB
- Parameters:
- rlen- number of rows
- odims- other dimensions
- v- value
 
 - 
capacitypublic long capacity() Description copied from class:DenseBlockGet the total length of allocated blocks.- Specified by:
- capacityin class- DenseBlock
- Returns:
- capacity
 
 - 
valuespublic double[] values(int r) Description copied from class:DenseBlockGet the allocated block for the given row. This call is equivalent to valuesAt(indexes(r)).- Specified by:
- valuesin class- DenseBlock
- Parameters:
- r- row index
- Returns:
- block
 
 - 
valuesAtpublic double[] valuesAt(int bix) Description copied from class:DenseBlockGet an allocated block.- Specified by:
- valuesAtin class- DenseBlock
- Parameters:
- bix- block index
- Returns:
- block
 
 - 
indexpublic int index(int r) Description copied from class:DenseBlockGet the block index for a given row.- Specified by:
- indexin class- DenseBlock
- Parameters:
- r- row index
- Returns:
- block index
 
 - 
incrpublic void incr(int r, int c)Description copied from class:DenseBlockIncrements the given value for a given row and column.- Specified by:
- incrin class- DenseBlock
- Parameters:
- r- row index
- c- column index
 
 - 
incrpublic void incr(int r, int c, double delta)Description copied from class:DenseBlockIncrements the given value for a given row and column by delta.- Specified by:
- incrin class- DenseBlock
- Parameters:
- r- row index
- c- column index
- delta- increment value
 
 - 
setpublic DenseBlock set(String s) Description copied from class:DenseBlockSet the given string for the entire dense block (fill). Generally the string will be parsed, except for string DenseBlock.- Overrides:
- setin class- DenseBlock
- Parameters:
- s- string
- Returns:
- self
 
 - 
setpublic DenseBlock set(int r, int c, double v) Description copied from class:DenseBlockSet the given value for a given row and column.- Specified by:
- setin class- DenseBlock
- Parameters:
- r- row index
- c- column index
- v- value
- Returns:
- self
 
 - 
setpublic DenseBlock set(DenseBlock db) Description copied from class:DenseBlockCopy the given dense block.- Specified by:
- setin class- DenseBlock
- Parameters:
- db- dense block
- Returns:
- self
 
 - 
setpublic DenseBlock set(int rl, int ru, int cl, int cu, DenseBlock db) Description copied from class:DenseBlockCopy the given dense block into the specified index range.- Overrides:
- setin class- DenseBlock
- Parameters:
- rl- row lower index
- ru- row upper index (exclusive)
- cl- column lower index
- cu- column upper index (exclusive)
- db- dense block
- Returns:
- self
 
 - 
setpublic DenseBlock set(int r, double[] v) Description copied from class:DenseBlockCopy the given vector into the given row.- Specified by:
- setin class- DenseBlock
- Parameters:
- r- row index
- v- value vector
- Returns:
- self
 
 - 
setpublic DenseBlock set(int[] ix, double v) Description copied from class:DenseBlockSet the specified cell to the given value.- Specified by:
- setin class- DenseBlock
- Parameters:
- ix- cell indexes
- v- value
- Returns:
- self
 
 - 
setpublic DenseBlock set(int[] ix, long v) Description copied from class:DenseBlockSet the specified cell to the given value.- Specified by:
- setin class- DenseBlock
- Parameters:
- ix- cell indexes
- v- value
- Returns:
- self
 
 - 
setpublic DenseBlock set(int[] ix, String v) Description copied from class:DenseBlockSet the specified cell to the given value.- Specified by:
- setin class- DenseBlock
- Parameters:
- ix- cell indexes
- v- value as String
- Returns:
- self
 
 - 
getpublic double get(int r, int c)Description copied from class:DenseBlockGet the value for a given row and column.- Specified by:
- getin class- DenseBlock
- Parameters:
- r- row index
- c- column index
- Returns:
- value
 
 - 
getpublic double get(int[] ix) Description copied from class:DenseBlockGet the value of a given cell- Specified by:
- getin class- DenseBlock
- Parameters:
- ix- cell indexes
- Returns:
- value
 
 - 
getStringpublic String getString(int[] ix) Description copied from class:DenseBlockGet the value of a given cell as a String- Specified by:
- getStringin class- DenseBlock
- Parameters:
- ix- cell indexes
- Returns:
- value as String
 
 - 
getLongpublic long getLong(int[] ix) Description copied from class:DenseBlockGet the value of a given cell as long- Specified by:
- getLongin class- DenseBlock
- Parameters:
- ix- cell indexes
- Returns:
- value as long
 
 
- 
 
-