Class DenseLargeDoubleMatrix3D
- java.lang.Object
-
- cern.colt.PersistentObject
-
- cern.colt.matrix.AbstractMatrix
-
- cern.colt.matrix.AbstractMatrix3D
-
- cern.colt.matrix.tdouble.DoubleMatrix3D
-
- cern.colt.matrix.tdouble.impl.WrapperDoubleMatrix3D
-
- cern.colt.matrix.tdouble.impl.DenseLargeDoubleMatrix3D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class DenseLargeDoubleMatrix3D extends WrapperDoubleMatrix3D
Dense 3-d matrix holding double 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 DenseLargeDoubleMatrix3D(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.double[][][]elements()Returns the elements of this matrix.voidfft3()Computes the 3D discrete Fourier transform (DFT) of this matrix.DenseLargeDComplexMatrix3DgetFft2Slices()Returns new complex matrix which is the 2D discrete Fourier transform (DFT) of each slice of this matrix.DenseLargeDComplexMatrix3DgetFft3()Returns new complex matrix which is the 3D discrete Fourier transform (DFT) of this matrix.DenseLargeDComplexMatrix3DgetIfft2Slices(boolean scale)Returns new complex matrix which is the 2D inverse of the discrete Fourier transform (IDFT) of each slice of this matrix.DenseLargeDComplexMatrix3DgetIfft3(boolean scale)Returns new complex matrix which is the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.doublegetQuick(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.DoubleMatrix3Dlike(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, double value)Sets the matrix cell at coordinate [slice,row,column] to the specified value.-
Methods inherited from class cern.colt.matrix.tdouble.impl.WrapperDoubleMatrix3D
like2D, vectorize, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSlice, viewSliceFlip, viewStrides
-
Methods inherited from class cern.colt.matrix.tdouble.DoubleMatrix3D
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
-
DenseLargeDoubleMatrix3D
public DenseLargeDoubleMatrix3D(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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- Parameters:
scale- if true then scaling is performed
-
dht3
public void dht3()
Computes the 3D discrete Hartley transform (DHT) of this matrix.- Overrides:
dht3in classWrapperDoubleMatrix3D
-
dht2Slices
public void dht2Slices()
Computes the 2D discrete Hartley transform (DHT) of each slice of this matrix.- Overrides:
dht2Slicesin classWrapperDoubleMatrix3D
-
dst3
public void dst3(boolean scale)
Computes the 3D discrete sine transform (DST-II) of this matrix.- Overrides:
dst3in classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 DenseLargeDComplexMatrix3D getFft2Slices()
Returns new complex matrix which is the 2D discrete Fourier transform (DFT) of each slice of this matrix.- Overrides:
getFft2Slicesin classWrapperDoubleMatrix3D- Returns:
- the 2D discrete Fourier transform (DFT) of each slice of this matrix.
-
getFft3
public DenseLargeDComplexMatrix3D getFft3()
Returns new complex matrix which is the 3D discrete Fourier transform (DFT) of this matrix.- Overrides:
getFft3in classWrapperDoubleMatrix3D- Returns:
- the 3D discrete Fourier transform (DFT) of this matrix.
-
getIfft2Slices
public DenseLargeDComplexMatrix3D 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 classWrapperDoubleMatrix3D- 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 DenseLargeDComplexMatrix3D getIfft3(boolean scale)
Returns new complex matrix which is the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.- Overrides:
getIfft3in classWrapperDoubleMatrix3D- Parameters:
scale- if true then scaling is performed- Returns:
- the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.
-
getQuick
public double getQuick(int slice, int row, int column)Description copied from class:DoubleMatrix3DReturns 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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 classWrapperDoubleMatrix3D- 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, double value)Description copied from class:DoubleMatrix3DSets 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 classWrapperDoubleMatrix3D- 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 double[][][] elements()
Description copied from class:DoubleMatrix3DReturns the elements of this matrix.- Overrides:
elementsin classWrapperDoubleMatrix3D- Returns:
- the elements
-
like
public DoubleMatrix3D like(int slices, int rows, int columns)
Description copied from class:DoubleMatrix3DConstruct 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 DenseDoubleMatrix3D the new matrix must also be of type DenseDoubleMatrix3D, if the receiver is an instance of type SparseDoubleMatrix3D the new matrix must also be of type SparseDoubleMatrix3D, etc. In general, the new matrix should have internal parametrization as similar as possible.- Overrides:
likein classWrapperDoubleMatrix3D- 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