public class DenseBlockLBool extends DenseBlockLDRB
DenseBlock.Type
Constructor and Description |
---|
DenseBlockLBool(int[] dims) |
Modifier and Type | Method and Description |
---|---|
long |
capacity()
Get the total length of allocated blocks.
|
double |
get(int[] ix)
Get the value of a given cell
|
double |
get(int r,
int c)
Get the value for a given row and column.
|
long |
getLong(int[] ix)
Get the value of a given cell as long
|
String |
getString(int[] ix)
Get the value of a given cell as a String
|
void |
incr(int r,
int c)
Increments the given value for a given row and column.
|
void |
incr(int r,
int c,
double delta)
Increments the given value for a given row and column
by delta.
|
boolean |
isContiguous()
Indicates if the dense block has a single
underlying block, i.e., if numBlocks==1.
|
boolean |
isNumeric()
Indicates if the dense block is numeric.
|
int |
numBlocks()
Get the number of allocated blocks.
|
void |
reset(int rlen,
int[] odims,
double v)
Resets the dense block by setting the given value.
|
DenseBlock |
set(int[] ix,
double v)
Set the specified cell to the given value.
|
DenseBlock |
set(int[] ix,
long v)
Set the specified cell to the given value.
|
DenseBlock |
set(int[] ix,
String v)
Set the specified cell to the given value.
|
DenseBlock |
set(int r,
int c,
double v)
Set the given value for a given row and column.
|
DenseBlock |
set(String s)
Set the given string for the entire dense block (fill).
|
double[] |
values(int r)
Get the allocated block for the given row.
|
double[] |
valuesAt(int bix)
Get an allocated block.
|
blockSize, blockSize, countNonZeros, countNonZeros, countNonZeros, index, isContiguous, pos, pos, pos, set, set, set, set, size
public boolean isNumeric()
DenseBlock
isNumeric
in class DenseBlock
public boolean isContiguous()
DenseBlock
isContiguous
in class DenseBlock
public void reset(int rlen, int[] odims, double v)
DenseBlock
reset
in class DenseBlockLDRB
rlen
- number of rowsodims
- other dimensionsv
- valuepublic int numBlocks()
DenseBlock
numBlocks
in class DenseBlock
public long capacity()
DenseBlock
capacity
in class DenseBlock
public double[] values(int r)
DenseBlock
values
in class DenseBlock
r
- row indexpublic double[] valuesAt(int bix)
DenseBlock
valuesAt
in class DenseBlock
bix
- block indexpublic void incr(int r, int c)
DenseBlock
incr
in class DenseBlock
r
- row indexc
- column indexpublic void incr(int r, int c, double delta)
DenseBlock
incr
in class DenseBlock
r
- row indexc
- column indexdelta
- increment valuepublic DenseBlock set(String s)
DenseBlock
set
in class DenseBlock
s
- stringpublic DenseBlock set(int r, int c, double v)
DenseBlock
set
in class DenseBlock
r
- row indexc
- column indexv
- valuepublic DenseBlock set(int[] ix, double v)
DenseBlock
set
in class DenseBlock
ix
- cell indexesv
- valuepublic DenseBlock set(int[] ix, long v)
DenseBlock
set
in class DenseBlock
ix
- cell indexesv
- valuepublic DenseBlock set(int[] ix, String v)
DenseBlock
set
in class DenseBlock
ix
- cell indexesv
- value as Stringpublic double get(int r, int c)
DenseBlock
get
in class DenseBlock
r
- row indexc
- column indexpublic double get(int[] ix)
DenseBlock
get
in class DenseBlock
ix
- cell indexespublic String getString(int[] ix)
DenseBlock
getString
in class DenseBlock
ix
- cell indexespublic long getLong(int[] ix)
DenseBlock
getLong
in class DenseBlock
ix
- cell indexesCopyright © 2020 The Apache Software Foundation. All rights reserved.