Parallel Colt 0.7.2

cern.colt.matrix.tfcomplex
Class FComplexFactory3D

java.lang.Object
  extended by cern.colt.PersistentObject
      extended by cern.colt.matrix.tfcomplex.FComplexFactory3D
All Implemented Interfaces:
Serializable, Cloneable

public class FComplexFactory3D
extends PersistentObject

Factory for convenient construction of 3-d matrices holding complex cells. Use idioms like ComplexFactory3D.dense.make(4,4,4) to construct dense matrices, ComplexFactory3D.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:

  ComplexFactory3D F = ComplexFactory3D.dense;
  F.make(4,4,4);
  F.random(4,4,5);
  ...
 

Version:
1.0, 12/10/2007
Author:
Piotr Wendykier (piotr.wendykier@gmail.com)
See Also:
Serialized Form

Field Summary
static FComplexFactory3D dense
          A factory producing dense matrices.
static FComplexFactory3D sparse
          A factory producing sparse matrices.
 
Method Summary
 FComplexMatrix3D make(float[][][] values)
          Constructs a matrix with the given cell values.
 FComplexMatrix3D make(int slices, int rows, int columns)
          Constructs a matrix with the given shape, each cell initialized with zero.
 FComplexMatrix3D make(int slices, int rows, int columns, float[] initialValue)
          Constructs a matrix with the given shape, each cell initialized with the given value.
 FComplexMatrix3D 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

dense

public static final FComplexFactory3D dense
A factory producing dense matrices.


sparse

public static final FComplexFactory3D sparse
A factory producing sparse matrices.

Method Detail

make

public FComplexMatrix3D make(float[][][] values)
Constructs a matrix with the given cell values. values is required to have the form values[slice][row][column] and have exactly the same number of slices, rows and columns as the receiver.

The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.

Parameters:
values - the values to be filled into the cells.
Returns:
this (for convenience only).
Throws:
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() .

make

public FComplexMatrix3D make(int slices,
                             int rows,
                             int columns)
Constructs a matrix with the given shape, each cell initialized with zero.


make

public FComplexMatrix3D make(int slices,
                             int rows,
                             int columns,
                             float[] initialValue)
Constructs a matrix with the given shape, each cell initialized with the given value.


random

public FComplexMatrix3D random(int slices,
                               int rows,
                               int columns)
Constructs a matrix with uniformly distributed values in (0,1) (exclusive).


Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage