public class ObjectFactory3D extends PersistentObject
ObjectFactory3D F = ObjectFactory3D.dense; F.make(4,4,4); ... |
Modifier and Type | Field and Description |
---|---|
static ObjectFactory3D |
dense
A factory producing dense matrices.
|
static ObjectFactory3D |
sparse
A factory producing sparse matrices.
|
Modifier and Type | Method and Description |
---|---|
ObjectMatrix3D |
make(int slices,
int rows,
int columns)
Constructs a matrix with the given shape, each cell initialized with
zero.
|
ObjectMatrix3D |
make(int slices,
int rows,
int columns,
Object initialValue)
Constructs a matrix with the given shape, each cell initialized with the
given value.
|
ObjectMatrix3D |
make(Object[][][] values)
Constructs a matrix with the given cell values.
|
clone
public static final ObjectFactory3D dense
public static final ObjectFactory3D sparse
public ObjectMatrix3D make(Object[][][] 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 ObjectMatrix3D make(int slices, int rows, int columns)
public ObjectMatrix3D make(int slices, int rows, int columns, Object initialValue)
Jump to the Parallel Colt Homepage