Package org.apache.sysds.runtime.data
Class DenseBlockLDRB
- java.lang.Object
- 
- org.apache.sysds.runtime.data.DenseBlock
- 
- org.apache.sysds.runtime.data.DenseBlockLDRB
 
 
- 
- All Implemented Interfaces:
- Serializable
 - Direct Known Subclasses:
- DenseBlockLBool,- DenseBlockLFP32,- DenseBlockLFP64,- DenseBlockLInt32,- DenseBlockLInt64,- DenseBlockLString
 
 public abstract class DenseBlockLDRB extends DenseBlock Dense Large Row Blocks have multiple 1D arrays (blocks), which contain complete rows. Except the last block all blocks have the same size (size refers to the number of rows contained and space allocated).- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.sysds.runtime.data.DenseBlockDenseBlock.Type
 
- 
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intblockSize()Get the number of rows per block, except last one.intblockSize(int bix)Get the number of rows of the given block.longcountNonZeros()Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks.intcountNonZeros(int r)Compute the number of non-zero values for the given row, which potentially makes a full pass over the underlying row.longcountNonZeros(int rl, int ru, int cl, int cu)Compute the number of non-zero values, which potentially makes a full pass over the underlying blocks in the row range.intindex(int r)Get the block index for a given row.booleanisContiguous(int rl, int ru)Indicates if the dense block has a single underlying block for the given row range.intpos(int r)Get the position for a given row within its associated block.intpos(int[] ix)Get the position for a given cell within the associated block.intpos(int r, int c)Get the position for a given row and column within the associated block.voidreset(int rlen, int[] odims, double v)Resets the dense block by setting the given value.DenseBlockset(double v)Set the given value for the entire dense block (fill).DenseBlockset(int r, double[] v)Copy the given vector into the given row.DenseBlockset(int rl, int ru, int cl, int cu, double v)Set the given value for an entire index range of the dense block (fill).DenseBlockset(DenseBlock db)Copy the given dense block.intsize(int bix)Get the length of the given block.- 
Methods inherited from class org.apache.sysds.runtime.data.DenseBlockcapacity, estimateMemory, get, get, getCumODims, getDim, getLong, getNextIndexes, getString, incr, incr, isContiguous, isNumeric, isNumeric, numBlocks, numDims, numRows, reset, reset, reset, reset, reset, reset, set, set, set, set, set, set, set, set, setDims, size, toString, values, valuesAt
 
- 
 
- 
- 
- 
Method Detail- 
blockSizepublic int blockSize() Description copied from class:DenseBlockGet the number of rows per block, except last one.- Specified by:
- blockSizein class- DenseBlock
- Returns:
- number of rows in block
 
 - 
blockSizepublic int blockSize(int bix) Description copied from class:DenseBlockGet the number of rows of the given block.- Specified by:
- blockSizein class- DenseBlock
- Parameters:
- bix- block index
- Returns:
- number of rows in block
 
 - 
resetpublic void reset(int rlen, int[] odims, double v)Description copied from class:DenseBlockResets the dense block by setting the given value.- Specified by:
- resetin class- DenseBlock
- Parameters:
- rlen- number of rows
- odims- other dimensions
- v- value
 
 - 
pospublic int pos(int[] ix) Description copied from class:DenseBlockGet the position for a given cell within the associated block.- Specified by:
- posin class- DenseBlock
- Parameters:
- ix- cell indexes
- Returns:
- block position
 
 - 
isContiguouspublic boolean isContiguous(int rl, int ru)Description copied from class:DenseBlockIndicates if the dense block has a single underlying block for the given row range.- Specified by:
- isContiguousin class- DenseBlock
- Parameters:
- rl- row lower index
- ru- row upper index (inclusive)
- Returns:
- true if single block in row range
 
 - 
sizepublic int size(int bix) Description copied from class:DenseBlockGet the length of the given block.- Specified by:
- sizein class- DenseBlock
- Parameters:
- bix- block index
- Returns:
- length
 
 - 
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
 
 - 
pospublic int pos(int r) Description copied from class:DenseBlockGet the position for a given row within its associated block.- Specified by:
- posin class- DenseBlock
- Parameters:
- r- row index
- Returns:
- block position
 
 - 
pospublic int pos(int r, int c)Description copied from class:DenseBlockGet the position for a given row and column within the associated block.- Specified by:
- posin class- DenseBlock
- Parameters:
- r- row index
- c- column index
- Returns:
- block position
 
 - 
countNonZerospublic long countNonZeros() Description copied from class:DenseBlockCompute the number of non-zero values, which potentially makes a full pass over the underlying blocks.- Specified by:
- countNonZerosin class- DenseBlock
- Returns:
- number of non-zeros
 
 - 
countNonZerospublic int countNonZeros(int r) Description copied from class:DenseBlockCompute the number of non-zero values for the given row, which potentially makes a full pass over the underlying row.- Specified by:
- countNonZerosin class- DenseBlock
- Parameters:
- r- row index
- Returns:
- number of non-zeros
 
 - 
countNonZerospublic long countNonZeros(int rl, int ru, int cl, int cu)Description copied from class:DenseBlockCompute the number of non-zero values, which potentially makes a full pass over the underlying blocks in the row range.- Specified by:
- countNonZerosin class- DenseBlock
- Parameters:
- rl- row lower index
- ru- row upper index (exclusive)
- cl- column lower index
- cu- column upper index (exclusive)
- Returns:
- number of non-zeros
 
 - 
setpublic DenseBlock set(double v) Description copied from class:DenseBlockSet the given value for the entire dense block (fill).- Specified by:
- setin class- DenseBlock
- Parameters:
- v- value
- Returns:
- self
 
 - 
setpublic DenseBlock set(int rl, int ru, int cl, int cu, double v) Description copied from class:DenseBlockSet the given value for an entire index range of the dense block (fill).- Specified by:
- setin class- DenseBlock
- Parameters:
- rl- row lower index
- ru- row upper index (exclusive)
- cl- column lower index
- cu- column upper index (exclusive)
- v- value
- 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(DenseBlock db) Description copied from class:DenseBlockCopy the given dense block.- Specified by:
- setin class- DenseBlock
- Parameters:
- db- dense block
- Returns:
- self
 
 
- 
 
-