public class FloatFactory3D extends PersistentObject
FloatFactory3D F = FloatFactory3D.dense; F.make(4,4,4); F.descending(10,20,5); F.random(4,4,5); ... |
Modifier and Type | Field and Description |
---|---|
static FloatFactory3D |
dense
A factory producing dense matrices.
|
static FloatFactory3D |
sparse
A factory producing sparse matrices.
|
Modifier and Type | Method and Description |
---|---|
FloatMatrix3D |
ascending(int slices,
int rows,
int columns)
Constructs a matrix with cells having ascending values.
|
FloatMatrix3D |
descending(int slices,
int rows,
int columns)
Constructs a matrix with cells having descending values.
|
FloatMatrix3D |
make(float[][][] values)
Constructs a matrix with the given cell values.
|
FloatMatrix3D |
make(int slices,
int rows,
int columns)
Constructs a matrix with the given shape, each cell initialized with
zero.
|
FloatMatrix3D |
make(int slices,
int rows,
int columns,
float initialValue)
Constructs a matrix with the given shape, each cell initialized with the
given value.
|
FloatMatrix3D |
random(int slices,
int rows,
int columns)
Constructs a matrix with uniformly distributed values in (0,1)
(exclusive).
|
clone
public static final FloatFactory3D dense
public static final FloatFactory3D sparse
public FloatMatrix3D ascending(int slices, int rows, int columns)
public FloatMatrix3D descending(int slices, int rows, int columns)
public FloatMatrix3D make(float[][][] values)
The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.
values
- the values to be filled into the cells.IllegalArgumentException
- if
values.length != slices() || for any 0 <= slice < slices(): values[slice].length != rows()
.IllegalArgumentException
- if
for any 0 <= column < columns(): values[slice][row].length != columns()
.public FloatMatrix3D make(int slices, int rows, int columns)
public FloatMatrix3D make(int slices, int rows, int columns, float initialValue)
public FloatMatrix3D random(int slices, int rows, int columns)
Jump to the Parallel Colt Homepage