public class DenseBlockFP32 extends DenseBlockDRB
DenseBlock.Type
Constructor and Description |
---|
DenseBlockFP32(int[] dims) |
DenseBlockFP32(int[] dims,
float[] data) |
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.
|
float[] |
getData() |
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.
|
int |
index(int r)
Get the block index for a given row.
|
boolean |
isNumeric()
Indicates if the dense block is numeric.
|
DenseBlock |
set(DenseBlock db)
Copy the given dense block.
|
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,
double[] v)
Copy the given vector into the given row.
|
DenseBlock |
set(int r,
int c,
double v)
Set the given value for a given row and column.
|
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, isContiguous, isContiguous, numBlocks, pos, pos, pos, reset, set, set, size
public DenseBlockFP32(int[] dims)
public DenseBlockFP32(int[] dims, float[] data)
public float[] getData()
public boolean isNumeric()
DenseBlock
isNumeric
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 int index(int r)
DenseBlock
index
in class DenseBlock
r
- row 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(int r, int c, double v)
DenseBlock
set
in class DenseBlock
r
- row indexc
- column indexv
- valuepublic DenseBlock set(DenseBlock db)
DenseBlock
set
in class DenseBlock
db
- dense blockpublic DenseBlock set(int r, double[] v)
DenseBlock
set
in class DenseBlock
r
- row indexv
- value vectorpublic 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.