public class DenseLargeFloatMatrix3D extends WrapperFloatMatrix3D
Implementation:
This data structure allows to store more than 2^31 elements. Internally holds one three-dimensional array, elements[slices][rows][columns]. Note that this implementation is not synchronized.
Time complexity:
O(1) (i.e. constant time) for the basic operations get, getQuick, set, setQuick and size.
Constructor and Description |
---|
DenseLargeFloatMatrix3D(int slices,
int rows,
int columns) |
Modifier and Type | Method and Description |
---|---|
void |
dct2Slices(boolean scale)
Computes the 2D discrete cosine transform (DCT-II) of each slice of this
matrix.
|
void |
dct3(boolean scale)
Computes the 3D discrete cosine transform (DCT-II) of this matrix.
|
void |
dht2Slices()
Computes the 2D discrete Hartley transform (DHT) of each slice of this
matrix.
|
void |
dht3()
Computes the 3D discrete Hartley transform (DHT) of this matrix.
|
void |
dst2Slices(boolean scale)
Computes the 2D discrete sine transform (DST-II) of each slice of this
matrix.
|
void |
dst3(boolean scale)
Computes the 3D discrete sine transform (DST-II) of this matrix.
|
float[][][] |
elements()
Returns the elements of this matrix.
|
void |
fft3()
Computes the 3D discrete Fourier transform (DFT) of this matrix.
|
DenseLargeFComplexMatrix3D |
getFft2Slices()
Returns new complex matrix which is the 2D discrete Fourier transform
(DFT) of each slice of this matrix.
|
DenseLargeFComplexMatrix3D |
getFft3()
Returns new complex matrix which is the 3D discrete Fourier transform
(DFT) of this matrix.
|
DenseLargeFComplexMatrix3D |
getIfft2Slices(boolean scale)
Returns new complex matrix which is the 2D inverse of the discrete
Fourier transform (IDFT) of each slice of this matrix.
|
DenseLargeFComplexMatrix3D |
getIfft3(boolean scale)
Returns new complex matrix which is the 3D inverse of the discrete
Fourier transform (IDFT) of this matrix.
|
float |
getQuick(int slice,
int row,
int column)
Returns the matrix cell value at coordinate [slice,row,column].
|
void |
idct2Slices(boolean scale)
Computes the 2D inverse of the discrete cosine transform (DCT-III) of
each slice of this matrix.
|
void |
idct3(boolean scale)
Computes the 3D inverse of the discrete cosine transform (DCT-III) of
this matrix.
|
void |
idht2Slices(boolean scale)
Computes the 2D inverse of the discrete Hartley transform (IDHT) of each
slice of this matrix.
|
void |
idht3(boolean scale)
Computes the 3D inverse of the discrete Hartley transform (IDHT) of this
matrix.
|
void |
idst2Slices(boolean scale)
Computes the 2D inverse of the discrete sine transform (DST-III) of each
slice of this matrix.
|
void |
idst3(boolean scale)
Computes the 3D inverse of the discrete sine transform (DST-III) of this
matrix.
|
void |
ifft3(boolean scale)
Computes the 3D inverse of the discrete Fourier transform (IDFT) of this
matrix.
|
FloatMatrix3D |
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.
|
like2D, vectorize, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSlice, viewSliceFlip, viewStrides
aggregate, aggregate, aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assign, cardinality, copy, equals, equals, get, getMaxLocation, getMinLocation, getNegativeValues, getNonZeros, getPositiveValues, like, normalize, set, toArray, toString, viewSelection, viewSorted, zAssign27Neighbors, zSum
checkShape, checkShape, columns, columnStride, index, rows, rowStride, size, slices, sliceStride, toStringShort
ensureCapacity, isView, trimToSize
clone
public DenseLargeFloatMatrix3D(int slices, int rows, int columns)
public void dct3(boolean scale)
dct3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void dct2Slices(boolean scale)
dct2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void dht3()
dht3
in class WrapperFloatMatrix3D
public void dht2Slices()
dht2Slices
in class WrapperFloatMatrix3D
public void dst3(boolean scale)
dst3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void dst2Slices(boolean scale)
dst2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void fft3()
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real forward transform, use
getFft3
. To get back the original
data, use ifft3
.fft3
in class WrapperFloatMatrix3D
IllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public DenseLargeFComplexMatrix3D getFft2Slices()
getFft2Slices
in class WrapperFloatMatrix3D
public DenseLargeFComplexMatrix3D getFft3()
getFft3
in class WrapperFloatMatrix3D
public DenseLargeFComplexMatrix3D getIfft2Slices(boolean scale)
getIfft2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic DenseLargeFComplexMatrix3D getIfft3(boolean scale)
getIfft3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic float getQuick(int slice, int row, int column)
FloatMatrix3D
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 WrapperFloatMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.public void idct2Slices(boolean scale)
idct2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void idht3(boolean scale)
idht3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedIllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public void idht2Slices(boolean scale)
idht2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedIllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public void idct3(boolean scale)
idct3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void idst2Slices(boolean scale)
idst2Slices
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void idst3(boolean scale)
idst3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedpublic void ifft3(boolean scale)
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real inverse transform, use
getIfft3
.ifft3
in class WrapperFloatMatrix3D
scale
- if true then scaling is performedIllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public void setQuick(int slice, int row, int column, float value)
FloatMatrix3D
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 WrapperFloatMatrix3D
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 float[][][] elements()
FloatMatrix3D
elements
in class WrapperFloatMatrix3D
public FloatMatrix3D like(int slices, int rows, int columns)
FloatMatrix3D
like
in class WrapperFloatMatrix3D
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.Jump to the Parallel Colt Homepage