public class DoubleFactory3D extends PersistentObject
DoubleFactory3D F = DoubleFactory3D.dense; F.make(4,4,4); F.descending(10,20,5); F.random(4,4,5); ... |
Modifier and Type | Field and Description |
---|---|
static DoubleFactory3D |
dense
A factory producing dense matrices.
|
static DoubleFactory3D |
sparse
A factory producing sparse matrices.
|
serialVersionUID
Modifier | Constructor and Description |
---|---|
protected |
DoubleFactory3D()
Makes this class non instantiable, but still let's others inherit from it.
|
Modifier and Type | Method and Description |
---|---|
DoubleMatrix3D |
ascending(int slices,
int rows,
int columns)
Constructs a matrix with cells having ascending values.
|
DoubleMatrix3D |
descending(int slices,
int rows,
int columns)
Constructs a matrix with cells having descending values.
|
DoubleMatrix3D |
make(double[][][] values)
Constructs a matrix with the given cell values.
|
DoubleMatrix3D |
make(int slices,
int rows,
int columns)
Constructs a matrix with the given shape, each cell initialized with zero.
|
DoubleMatrix3D |
make(int slices,
int rows,
int columns,
double initialValue)
Constructs a matrix with the given shape, each cell initialized with the given value.
|
DoubleMatrix3D |
random(int slices,
int rows,
int columns)
Constructs a matrix with uniformly distributed values in (0,1) (exclusive).
|
clone
public static final DoubleFactory3D dense
public static final DoubleFactory3D sparse
protected DoubleFactory3D()
public DoubleMatrix3D ascending(int slices, int rows, int columns)
public DoubleMatrix3D descending(int slices, int rows, int columns)
public DoubleMatrix3D make(double[][][] 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 DoubleMatrix3D make(int slices, int rows, int columns)
public DoubleMatrix3D make(int slices, int rows, int columns, double initialValue)
public DoubleMatrix3D random(int slices, int rows, int columns)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.