DenseLargeFloatMatrix3D
cern.colt.matrix.tfloat.impl

Class DenseLargeFloatMatrix3D

  • All Implemented Interfaces:
    Serializable, Cloneable


    public class DenseLargeFloatMatrix3Dextends 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 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:
        dct3 in class WrapperFloatMatrix3D
        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:
        dct2Slices in class WrapperFloatMatrix3D
        Parameters:
        scale - if true then scaling is performed
      • dht3

        public void dht3()
        Computes the 3D discrete Hartley transform (DHT) of this matrix.
        Overrides:
        dht3 in class WrapperFloatMatrix3D
      • dht2Slices

        public void dht2Slices()
        Computes the 2D discrete Hartley transform (DHT) of each slice of this matrix.
        Overrides:
        dht2Slices in class WrapperFloatMatrix3D
      • dst3

        public void dst3(boolean scale)
        Computes the 3D discrete sine transform (DST-II) of this matrix.
        Overrides:
        dst3 in class WrapperFloatMatrix3D
        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:
        dst2Slices in class WrapperFloatMatrix3D
        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, use getFft3. To get back the original data, use ifft3.
        Overrides:
        fft3 in class WrapperFloatMatrix3D
        Throws:
        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:
        getFft2Slices in class WrapperFloatMatrix3D
        Returns:
        the 2D discrete Fourier transform (DFT) of each slice 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:
        getIfft2Slices in class WrapperFloatMatrix3D
        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:
        getIfft3 in class WrapperFloatMatrix3D
        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: FloatMatrix3D
        Returns 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:
        getQuick in class WrapperFloatMatrix3D
        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:
        idct2Slices in class WrapperFloatMatrix3D
        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:
        idht3 in class WrapperFloatMatrix3D
        Parameters:
        scale - if true then scaling is performed
        Throws:
        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:
        idht2Slices in class WrapperFloatMatrix3D
        Parameters:
        scale - if true then scaling is performed
        Throws:
        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:
        idct3 in class WrapperFloatMatrix3D
        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:
        idst2Slices in class WrapperFloatMatrix3D
        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:
        idst3 in class WrapperFloatMatrix3D
        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, use getIfft3.
        Overrides:
        ifft3 in class WrapperFloatMatrix3D
        Parameters:
        scale - if true then scaling is performed
        Throws:
        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: FloatMatrix3D
        Sets 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:
        setQuick in class WrapperFloatMatrix3D
        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.
      • like

        public FloatMatrix3D like(int slices,                 int rows,                 int columns)
        Description copied from class: FloatMatrix3D
        Construct 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:
        like in class WrapperFloatMatrix3D
        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.

SCaVis 2.0 © jWork.ORG