|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.colt.matrix.tint.IntFactory3D
public class IntFactory3D
Factory for convenient construction of 3-d matrices holding int cells. Use idioms like IntFactory3D.dense.make(4,4,4) to construct dense matrices, IntFactory3D.sparse.make(4,4,4) to construct sparse matrices. If the factory is used frequently it might be useful to streamline the notation. For example by aliasing:
IntFactory3D F = IntFactory3D.dense; F.make(4,4,4); F.descending(10,20,5); F.random(4,4,5); ... |
Field Summary | |
---|---|
static IntFactory3D |
dense
A factory producing dense matrices. |
static IntFactory3D |
sparse
A factory producing sparse matrices. |
Method Summary | |
---|---|
IntMatrix3D |
ascending(int slices,
int rows,
int columns)
Constructs a matrix with cells having ascending values. |
IntMatrix3D |
descending(int slices,
int rows,
int columns)
Constructs a matrix with cells having descending values. |
IntMatrix3D |
make(int[][][] values)
Constructs a matrix with the given cell values. |
IntMatrix3D |
make(int slices,
int rows,
int columns)
Constructs a matrix with the given shape, each cell initialized with zero. |
IntMatrix3D |
make(int slices,
int rows,
int columns,
int initialValue)
Constructs a matrix with the given shape, each cell initialized with the given value. |
IntMatrix3D |
random(int slices,
int rows,
int columns)
Constructs a matrix with uniformly distributed values in (0,1) (exclusive). |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IntFactory3D dense
public static final IntFactory3D sparse
Method Detail |
---|
public IntMatrix3D ascending(int slices, int rows, int columns)
public IntMatrix3D descending(int slices, int rows, int columns)
public IntMatrix3D make(int[][][] 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 IntMatrix3D make(int slices, int rows, int columns)
public IntMatrix3D make(int slices, int rows, int columns, int initialValue)
public IntMatrix3D random(int slices, int rows, int columns)
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |