public abstract class DenseBlockLDRB extends DenseBlock
DenseBlock.Type
Modifier and Type | Method and Description |
---|---|
int |
blockSize()
Get the number of rows per block, except last one.
|
int |
blockSize(int bix)
Get the number of rows of the given block.
|
long |
countNonZeros()
Compute the number of non-zero values, which potentially
makes a full pass over the underlying blocks.
|
int |
countNonZeros(int r)
Compute the number of non-zero values for the given row,
which potentially makes a full pass over the underlying row.
|
long |
countNonZeros(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.
|
int |
index(int r)
Get the block index for a given row.
|
boolean |
isContiguous(int rl,
int ru)
Indicates if the dense block has a single
underlying block for the given row range.
|
int |
pos(int r)
Get the position for a given row within
its associated block.
|
int |
pos(int[] ix)
Get the position for a given cell
within the associated block.
|
int |
pos(int r,
int c)
Get the position for a given row and column
within the associated block.
|
void |
reset(int rlen,
int[] odims,
double v)
Resets the dense block by setting the given value.
|
DenseBlock |
set(DenseBlock db)
Copy the given dense block.
|
DenseBlock |
set(double v)
Set the given value for the entire dense block (fill).
|
DenseBlock |
set(int r,
double[] v)
Copy the given vector into the given row.
|
DenseBlock |
set(int rl,
int ru,
int cl,
int cu,
double v)
Set the given value for an entire index range of the
dense block (fill).
|
int |
size(int bix)
Get the length of the given block.
|
capacity, get, get, getCumODims, getDim, getLong, getNextIndexes, getString, incr, incr, isContiguous, isNumeric, numBlocks, numDims, numRows, reset, reset, reset, reset, reset, reset, set, set, set, set, set, set, set, set, size, toString, values, valuesAt
public int blockSize()
DenseBlock
blockSize
in class DenseBlock
public int blockSize(int bix)
DenseBlock
blockSize
in class DenseBlock
bix
- block indexpublic void reset(int rlen, int[] odims, double v)
DenseBlock
reset
in class DenseBlock
rlen
- number of rowsodims
- other dimensionsv
- valuepublic int pos(int[] ix)
DenseBlock
pos
in class DenseBlock
ix
- cell indexespublic boolean isContiguous(int rl, int ru)
DenseBlock
isContiguous
in class DenseBlock
rl
- row lower indexru
- row upper index (inclusive)public int size(int bix)
DenseBlock
size
in class DenseBlock
bix
- block indexpublic int index(int r)
DenseBlock
index
in class DenseBlock
r
- row indexpublic int pos(int r)
DenseBlock
pos
in class DenseBlock
r
- row indexpublic int pos(int r, int c)
DenseBlock
pos
in class DenseBlock
r
- row indexc
- column indexpublic long countNonZeros()
DenseBlock
countNonZeros
in class DenseBlock
public int countNonZeros(int r)
DenseBlock
countNonZeros
in class DenseBlock
r
- row indexpublic long countNonZeros(int rl, int ru, int cl, int cu)
DenseBlock
countNonZeros
in class DenseBlock
rl
- row lower indexru
- row upper index (exclusive)cl
- column lower indexcu
- column upper index (exclusive)public DenseBlock set(double v)
DenseBlock
set
in class DenseBlock
v
- valuepublic DenseBlock set(int rl, int ru, int cl, int cu, double v)
DenseBlock
set
in class DenseBlock
rl
- row lower indexru
- row upper index (exclusive)cl
- column lower indexcu
- column upper index (exclusive)v
- valuepublic DenseBlock set(int r, double[] v)
DenseBlock
set
in class DenseBlock
r
- row indexv
- value vectorpublic DenseBlock set(DenseBlock db)
DenseBlock
set
in class DenseBlock
db
- dense blockCopyright © 2020 The Apache Software Foundation. All rights reserved.