WrapperFloatMatrix3D
cern.colt.matrix.tfloat.impl

Class WrapperFloatMatrix3D

    • Constructor Detail

      • WrapperFloatMatrix3D

        public WrapperFloatMatrix3D(FloatMatrix3D newContent)
    • Method Detail

      • dct3

        public void dct3(boolean scale)
        Computes the 3D discrete cosine transform (DCT-II) of this matrix.
        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.
        Parameters:
        scale - if true then scaling is performed
      • dst3

        public void dst3(boolean scale)
        Computes the 3D discrete sine transform (DST-II) of this matrix.
        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.
        Parameters:
        scale - if true then scaling is performed
      • dht3

        public void dht3()
        Computes the 3D discrete Hartley transform (DHT) of this matrix.
      • dht2Slices

        public void dht2Slices()
        Computes the 2D discrete Hertley transform (DHT) of each column of this matrix.
      • 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.
        Throws:
        IllegalArgumentException - if the slice size or the row size or the column size of this matrix is not a power of 2 number.
      • getFft3

        public DenseLargeFComplexMatrix3D getFft3()
        Returns new complex matrix which is the 3D discrete Fourier transform (DFT) of this matrix.
        Returns:
        the 3D discrete Fourier transform (DFT) 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.
        Returns:
        the 3D inverse of the discrete Fourier transform (IDFT) of this matrix.
      • getFft2Slices

        public DenseLargeFComplexMatrix3D getFft2Slices()
        Returns new complex matrix which is the 2D discrete Fourier transform (DFT) of each slice of this matrix.
        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.
        Returns:
        the 2D inverse of the discrete Fourier transform (IDFT) of each slice of this matrix.
      • idct3

        public void idct3(boolean scale)
        Computes the 3D inverse of the discrete cosine transform (DCT-III) of this matrix.
        Parameters:
        scale - if true then scaling is performed
      • idct2Slices

        public void idct2Slices(boolean scale)
        Computes the 2D inverse of the discrete cosine transform (DCT-III) of each slice of this matrix.
        Parameters:
        scale - if true then scaling is performed
      • idst3

        public void idst3(boolean scale)
        Computes the 3D inverse of the discrete size transform (DST-III) of this matrix.
        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.
        Parameters:
        scale - if true then scaling is performed
      • idht3

        public void idht3(boolean scale)
        Computes the 3D inverse of the discrete Hartley transform (DHT) of this matrix.
        Parameters:
        scale - if true then scaling is performed
      • idht2Slices

        public void idht2Slices(boolean scale)
        Computes the 2D inverse of the discrete Hartley transform (DHT) of each slice of this matrix.
        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.
        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.
      • 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().

        Specified by:
        getQuick in class FloatMatrix3D
        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.
      • 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.
        Specified by:
        like in class FloatMatrix3D
        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.
      • 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().

        Specified by:
        setQuick in class FloatMatrix3D
        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.
      • vectorize

        public FloatMatrix1D vectorize()
        Description copied from class: FloatMatrix3D
        Returns a vector obtained by stacking the columns of each slice of the matrix on top of one another.
        Specified by:
        vectorize in class FloatMatrix3D
        Returns:
        a vector obtained by stacking the columns of each slice of the matrix on top of one another.
      • viewColumn

        public FloatMatrix2D viewColumn(int column)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new 2-dimensional slice view representing the slices and rows of the given column. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.

        To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.

        Overrides:
        viewColumn in class FloatMatrix3D
        Parameters:
        column - the index of the column to fix.
        Returns:
        a new 2-dimensional slice view.
        See Also:
        FloatMatrix3D.viewSlice(int), FloatMatrix3D.viewRow(int)
      • viewSlice

        public FloatMatrix2D viewSlice(int slice)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new 2-dimensional slice view representing the rows and columns of the given slice. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.

        To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.

        Overrides:
        viewSlice in class FloatMatrix3D
        Parameters:
        slice - the index of the slice to fix.
        Returns:
        a new 2-dimensional slice view.
        See Also:
        FloatMatrix3D.viewRow(int), FloatMatrix3D.viewColumn(int)
      • viewDice

        public FloatMatrix3D viewDice(int axis0,                     int axis1,                     int axis2)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new dice view; Swaps dimensions (axes); Example: 3 x 4 x 5 matrix --> 4 x 3 x 5 matrix. The view has dimensions exchanged; what used to be one axis is now another, in all desired permutations. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
        Overrides:
        viewDice in class FloatMatrix3D
        Parameters:
        axis0 - the axis that shall become axis 0 (legal values 0..2).
        axis1 - the axis that shall become axis 1 (legal values 0..2).
        axis2 - the axis that shall become axis 2 (legal values 0..2).
        Returns:
        a new dice view.
      • viewPart

        public FloatMatrix3D viewPart(int slice,                     int row,                     int column,                     int depth,                     int height,                     int width)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new sub-range view that is a depth x height x width sub matrix starting at [slice,row,column]; Equivalent to view().part(slice,row,column,depth,height,width); Provided for convenience only. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
        Overrides:
        viewPart in class FloatMatrix3D
        Parameters:
        slice - The index of the slice-coordinate.
        row - The index of the row-coordinate.
        column - The index of the column-coordinate.
        depth - The depth of the box.
        height - The height of the box.
        width - The width of the box.
        Returns:
        the new view.
      • viewRow

        public FloatMatrix2D viewRow(int row)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new 2-dimensional slice view representing the slices and columns of the given row. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.

        To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.

        Overrides:
        viewRow in class FloatMatrix3D
        Parameters:
        row - the index of the row to fix.
        Returns:
        a new 2-dimensional slice view.
        See Also:
        FloatMatrix3D.viewSlice(int), FloatMatrix3D.viewColumn(int)
      • viewSelection

        public FloatMatrix3D viewSelection(int[] sliceIndexes,                          int[] rowIndexes,                          int[] columnIndexes)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new selection view that is a matrix holding the indicated cells. There holds view.slices() == sliceIndexes.length, view.rows() == rowIndexes.length, view.columns() == columnIndexes.length and view.get(k,i,j) == this.get(sliceIndexes[k],rowIndexes[i],columnIndexes[j]) . Indexes can occur multiple times and can be in arbitrary order. For an example see FloatMatrix2D.viewSelection(int[],int[]).

        Note that modifying the index arguments after this call has returned has no effect on the view. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.

        Overrides:
        viewSelection in class FloatMatrix3D
        Parameters:
        sliceIndexes - The slices of the cells that shall be visible in the new view. To indicate that all slices shall be visible, simply set this parameter to null.
        rowIndexes - The rows of the cells that shall be visible in the new view. To indicate that all rows shall be visible, simply set this parameter to null.
        columnIndexes - The columns of the cells that shall be visible in the new view. To indicate that all columns shall be visible, simply set this parameter to null.
        Returns:
        the new view.
      • viewStrides

        public FloatMatrix3D viewStrides(int _sliceStride,                        int _rowStride,                        int _columnStride)
        Description copied from class: FloatMatrix3D
        Constructs and returns a new stride view which is a sub matrix consisting of every i-th cell. More specifically, the view has this.slices()/sliceStride slices and this.rows()/rowStride rows and this.columns()/columnStride columns holding cells this.get(k*sliceStride,i*rowStride,j*columnStride) for all k = 0..slices()/sliceStride - 1, i = 0..rows()/rowStride - 1, j = 0..columns()/columnStride - 1 . The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
        Overrides:
        viewStrides in class FloatMatrix3D
        Parameters:
        _sliceStride - the slice step factor.
        _rowStride - the row step factor.
        _columnStride - the column step factor.
        Returns:
        a new view.
      • like2D

        public FloatMatrix2D like2D(int rows,                   int columns)
        Description copied from class: FloatMatrix3D
        Construct and returns a new 2-d matrix of the corresponding dynamic type, sharing the same cells. For example, if the receiver is an instance of type DenseFloatMatrix3D the new matrix must also be of type DenseFloatMatrix2D, if the receiver is an instance of type SparseFloatMatrix3D the new matrix must also be of type SparseFloatMatrix2D, etc.
        Specified by:
        like2D in class FloatMatrix3D
        Parameters:
        rows - the number of rows the matrix shall have.
        columns - the number of columns the matrix shall have.
        Returns:
        a new matrix of the corresponding dynamic type.

SCaVis 1.8 © jWork.org