Class DenseLargeFloatMatrix3D
- java.lang.Object
-
- cern.colt.PersistentObject
-
- cern.colt.matrix.AbstractMatrix
-
- cern.colt.matrix.AbstractMatrix3D
-
- cern.colt.matrix.tfloat.FloatMatrix3D
-
- cern.colt.matrix.tfloat.impl.WrapperFloatMatrix3D
-
- cern.colt.matrix.tfloat.impl.DenseLargeFloatMatrix3D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class DenseLargeFloatMatrix3D extends WrapperFloatMatrix3D
Dense 3-d matrix holding float elements. First see the package summary and javadoc tree view to get the broad picture.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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DenseLargeFloatMatrix3D(int slices, int rows, int columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddct2Slices(boolean scale)Computes the 2D discrete cosine transform (DCT-II) of each slice of this matrix.voiddct3(boolean scale)Computes the 3D discrete cosine transform (DCT-II) of this matrix.voiddht2Slices()Computes the 2D discrete Hartley transform (DHT) of each slice of this matrix.voiddht3()Computes the 3D discrete Hartley transform (DHT) of this matrix.voiddst2Slices(boolean scale)Computes the 2D discrete sine transform (DST-II) of each slice of this matrix.voiddst3(boolean scale)Computes the 3D discrete sine transform (DST-II) of this matrix.float[][][]elements()Returns the elements of this matrix.voidfft3()Computes the 3D discrete Fourier transform (DFT) of this matrix.DenseLargeFComplexMatrix3DgetFft2Slices()Returns new complex matrix which is the 2D discrete Fourier transform (DFT) of each slice of this matrix.DenseLargeFComplexMatrix3DgetFft3()Returns new complex matrix which is the 3D discrete Fourier transform (DFT) of this matrix.DenseLargeFComplexMatrix3DgetIfft2Slices(boolean scale)Returns new complex matrix which is the 2D inverse of the discrete Fourier transform (IDFT) of each slice of this matrix.DenseLargeFComplexMatrix3DgetIfft3(boolean scale)Returns new complex matrix which is the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.floatgetQuick(int slice, int row, int column)Returns the matrix cell value at coordinate [slice,row,column].voididct2Slices(boolean scale)Computes the 2D inverse of the discrete cosine transform (DCT-III) of each slice of this matrix.voididct3(boolean scale)Computes the 3D inverse of the discrete cosine transform (DCT-III) of this matrix.voididht2Slices(boolean scale)Computes the 2D inverse of the discrete Hartley transform (IDHT) of each slice of this matrix.voididht3(boolean scale)Computes the 3D inverse of the discrete Hartley transform (IDHT) of this matrix.voididst2Slices(boolean scale)Computes the 2D inverse of the discrete sine transform (DST-III) of each slice of this matrix.voididst3(boolean scale)Computes the 3D inverse of the discrete sine transform (DST-III) of this matrix.voidifft3(boolean scale)Computes the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.FloatMatrix3Dlike(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.voidsetQuick(int slice, int row, int column, float value)Sets the matrix cell at coordinate [slice,row,column] to the specified value.-
Methods inherited from class cern.colt.matrix.tfloat.impl.WrapperFloatMatrix3D
like2D, vectorize, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSlice, viewSliceFlip, viewStrides
-
Methods inherited from class cern.colt.matrix.tfloat.FloatMatrix3D
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
-
Methods inherited from class cern.colt.matrix.AbstractMatrix3D
checkShape, checkShape, columns, columnStride, index, 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
-
-
-
-
Constructor Detail
-
DenseLargeFloatMatrix3D
public DenseLargeFloatMatrix3D(int slices, int rows, int columns)
-
-
Method Detail
-
dct3
public void dct3(boolean scale)
Computes the 3D discrete cosine transform (DCT-II) of this matrix.- Overrides:
dct3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
dct2Slices
public void dct2Slices(boolean scale)
Computes the 2D discrete cosine transform (DCT-II) of each slice of this matrix.- Overrides:
dct2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
dht3
public void dht3()
Computes the 3D discrete Hartley transform (DHT) of this matrix.- Overrides:
dht3in classWrapperFloatMatrix3D
-
dht2Slices
public void dht2Slices()
Computes the 2D discrete Hartley transform (DHT) of each slice of this matrix.- Overrides:
dht2Slicesin classWrapperFloatMatrix3D
-
dst3
public void dst3(boolean scale)
Computes the 3D discrete sine transform (DST-II) of this matrix.- Overrides:
dst3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
dst2Slices
public void dst2Slices(boolean scale)
Computes the 2D discrete sine transform (DST-II) of each slice of this matrix.- Overrides:
dst2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
fft3
public void fft3()
Computes the 3D discrete Fourier transform (DFT) of this matrix. The physical layout of the output data is as follows: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, usegetFft3. To get back the original data, useifft3.- Overrides:
fft3in classWrapperFloatMatrix3D- Throws:
java.lang.IllegalArgumentException- if the slice size or the row size or the column size of this matrix is not a power of 2 number.
-
getFft2Slices
public DenseLargeFComplexMatrix3D getFft2Slices()
Returns new complex matrix which is the 2D discrete Fourier transform (DFT) of each slice of this matrix.- Overrides:
getFft2Slicesin classWrapperFloatMatrix3D- Returns:
- the 2D discrete Fourier transform (DFT) of each slice of this matrix.
-
getFft3
public DenseLargeFComplexMatrix3D getFft3()
Returns new complex matrix which is the 3D discrete Fourier transform (DFT) of this matrix.- Overrides:
getFft3in classWrapperFloatMatrix3D- Returns:
- the 3D discrete Fourier transform (DFT) of this matrix.
-
getIfft2Slices
public 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.- Overrides:
getIfft2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed- Returns:
- the 2D inverse of the discrete Fourier transform (IDFT) of each slice of this matrix.
-
getIfft3
public DenseLargeFComplexMatrix3D getIfft3(boolean scale)
Returns new complex matrix which is the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.- Overrides:
getIfft3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed- Returns:
- the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.
-
getQuick
public float getQuick(int slice, int row, int column)Description copied from class:FloatMatrix3DReturns the matrix cell value at coordinate [slice,row,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().
- Overrides:
getQuickin classWrapperFloatMatrix3D- Parameters:
slice- the index of the slice-coordinate.row- the index of the row-coordinate.column- the index of the column-coordinate.- Returns:
- the value at the specified coordinate.
-
idct2Slices
public void idct2Slices(boolean scale)
Computes the 2D inverse of the discrete cosine transform (DCT-III) of each slice of this matrix.- Overrides:
idct2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
idht3
public void idht3(boolean scale)
Computes the 3D inverse of the discrete Hartley transform (IDHT) of this matrix.- Overrides:
idht3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed- Throws:
java.lang.IllegalArgumentException- if the slice size or the row size or the column size of this matrix is not a power of 2 number.
-
idht2Slices
public void idht2Slices(boolean scale)
Computes the 2D inverse of the discrete Hartley transform (IDHT) of each slice of this matrix.- Overrides:
idht2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed- Throws:
java.lang.IllegalArgumentException- if the slice size or the row size or the column size of this matrix is not a power of 2 number.
-
idct3
public void idct3(boolean scale)
Computes the 3D inverse of the discrete cosine transform (DCT-III) of this matrix.- Overrides:
idct3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
idst2Slices
public void idst2Slices(boolean scale)
Computes the 2D inverse of the discrete sine transform (DST-III) of each slice of this matrix.- Overrides:
idst2Slicesin classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
idst3
public void idst3(boolean scale)
Computes the 3D inverse of the discrete sine transform (DST-III) of this matrix.- Overrides:
idst3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed
-
ifft3
public void ifft3(boolean scale)
Computes the 3D inverse of the discrete Fourier transform (IDFT) of this matrix. The physical layout of the input data has to be as follows: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, usegetIfft3.- Overrides:
ifft3in classWrapperFloatMatrix3D- Parameters:
scale- if true then scaling is performed- Throws:
java.lang.IllegalArgumentException- if the slice size or the row size or the column size of this matrix is not a power of 2 number.
-
setQuick
public void setQuick(int slice, int row, int column, float value)Description copied from class:FloatMatrix3DSets the matrix cell at coordinate [slice,row,column] to the specified 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().
- Overrides:
setQuickin classWrapperFloatMatrix3D- Parameters:
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.
-
elements
public float[][][] elements()
Description copied from class:FloatMatrix3DReturns the elements of this matrix.- Overrides:
elementsin classWrapperFloatMatrix3D- Returns:
- the elements
-
like
public FloatMatrix3D like(int slices, int rows, int columns)
Description copied from class:FloatMatrix3DConstruct and returns a new empty matrix of the same dynamic type as the receiver, having the specified number of slices, rows and columns. For example, if the receiver is an instance of type DenseFloatMatrix3D the new matrix must also be of type DenseFloatMatrix3D, if the receiver is an instance of type SparseFloatMatrix3D the new matrix must also be of type SparseFloatMatrix3D, etc. In general, the new matrix should have internal parametrization as similar as possible.- Overrides:
likein classWrapperFloatMatrix3D- Parameters:
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.- Returns:
- a new empty matrix of the same dynamic type.
-
-
DMelt 3.0 © DataMelt by jWork.ORG