|
Parallel Colt 0.7.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cern.colt.PersistentObject cern.colt.matrix.AbstractMatrix cern.colt.matrix.AbstractMatrix3D cern.colt.matrix.tfcomplex.FComplexMatrix3D cern.colt.matrix.tfcomplex.impl.SparseFComplexMatrix3D
public class SparseFComplexMatrix3D
Sparse hashed 3-d matrix holding complex elements. Note that this implementation uses ConcurrentHashMap
Constructor Summary | |
---|---|
SparseFComplexMatrix3D(float[][][] values)
Constructs a matrix with a copy of the given values. |
|
SparseFComplexMatrix3D(int slices,
int rows,
int columns)
Constructs a matrix with a given number of slices, rows and columns and default memory usage. |
Method Summary | |
---|---|
FComplexMatrix3D |
assign(float[] value)
Sets all cells to the state specified by value. |
int |
cardinality()
Returns the number of cells having non-zero values. |
ConcurrentHashMap<Integer,float[]> |
elements()
Returns the elements of this matrix. |
FloatMatrix3D |
getImaginaryPart()
Returns the imaginary part of this matrix |
float[] |
getQuick(int slice,
int row,
int column)
Returns the matrix cell value at coordinate [slice,row,column]. |
FloatMatrix3D |
getRealPart()
Returns the real part of this matrix |
long |
index(int slice,
int row,
int column)
Returns the position of the given coordinate within the (virtual or non-virtual) internal 1-dimensional array. |
FComplexMatrix3D |
like(int slices,
int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified number of slices, rows and columns. |
void |
setQuick(int slice,
int row,
int column,
float[] value)
Sets the matrix cell at coordinate [slice,row,column] to the specified value. |
void |
setQuick(int slice,
int row,
int column,
float re,
float im)
Sets the matrix cell at coordinate [slice,row,column] to the specified value. |
FComplexMatrix1D |
vectorize()
Returns a vector obtained by stacking the columns of each slice of the matrix on top of one another. |
Methods inherited from class cern.colt.matrix.tfcomplex.FComplexMatrix3D |
---|
aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assignImaginary, assignReal, copy, equals, equals, get, getNonZeros, like, set, toArray, toString, toString, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSelection, viewSlice, viewSliceFlip, viewStrides, zSum |
Methods inherited from class cern.colt.matrix.AbstractMatrix3D |
---|
checkShape, checkShape, columns, columnStride, rows, rowStride, size, slices, sliceStride, toStringShort |
Methods inherited from class cern.colt.matrix.AbstractMatrix |
---|
ensureCapacity, isView, trimToSize |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SparseFComplexMatrix3D(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 new matrix.
IllegalArgumentException
- if
for any 1 <= slice < values.length: values[slice].length != values[slice-1].length
.
IllegalArgumentException
- if
for any 1 <= row < values[0].length: values[slice][row].length != values[slice][row-1].length
.public SparseFComplexMatrix3D(int slices, int rows, int columns)
slices
- the number of slices the matrix shall have.rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.
IllegalArgumentException
- if (float)slices*columns*rows > Integer.MAX_VALUE.
IllegalArgumentException
- if slices<0 || rows<0 || columns<0.Method Detail |
---|
public FComplexMatrix3D assign(float[] value)
assign
in class FComplexMatrix3D
value
- the value to be filled into the cells.
public int cardinality()
cardinality
in class FComplexMatrix3D
public float[] getQuick(int slice, int row, int column)
Provided with invalid parameters this method may return invalid objects without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
getQuick
in class FComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.
public ConcurrentHashMap<Integer,float[]> elements()
elements
in class FComplexMatrix3D
public long index(int slice, int row, int column)
index
in class AbstractMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the third-coordinate.public FComplexMatrix3D like(int slices, int rows, int columns)
like
in class FComplexMatrix3D
slices
- the number of slices the matrix shall have.rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.
public void setQuick(int slice, int row, int column, float[] value)
Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
setQuick
in class FComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.value
- the value to be filled into the specified cell.public void setQuick(int slice, int row, int column, float re, float im)
Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
setQuick
in class FComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.re
- the real part of the value to be filled into the specified
cell.im
- the imaginary part of the value to be filled into the
specified cell.public FComplexMatrix1D vectorize()
vectorize
in class FComplexMatrix3D
public FloatMatrix3D getImaginaryPart()
getImaginaryPart
in class FComplexMatrix3D
public FloatMatrix3D getRealPart()
getRealPart
in class FComplexMatrix3D
|
Parallel Colt 0.7.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |