TMtx.IFFT2DToReal Method

Overload List

#SignatureDescription
1TMtx IFFT2DToReal(TMtx Mtx, Boolean NoScale)Inverse two-dimensional Fast Fourier Transformation from complex to real.
2TMtx IFFT2DToReal(Boolean NoScale)Inverse two-dimentional Fast Fourier Transformation from complex to real.

Overload 1: TMtx IFFT2DToReal(TMtx Mtx, Boolean NoScale)

Inverse two-dimensional Fast Fourier Transformation from complex to real.

#NameTypeDescription
1MtxTMtxsource TMtx
2NoScaleBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

Transformation is applied on source Mtx matrix and results are saved in the calling matrix. Source matrix must be real, if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfPack or to fsfPack. Check the storage format requirements to see how the complex numbers are to be stored in a real matrix. Source matrix must be complex, if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfCCS. The source matrix will not be changed. The calling matrix becomes real. Size of the calling matrix will be set to [Mtx.Rows,Mtx.Cols], if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfPack or to fsfPack. Size of calling matrix will be set to [Mtx.Rows, 2*Mtx.Cols], if Dew.Math.TDenseMtxVec.FFTStorageFormat is set to fsfCCS. All element are involved into the inverse transformation, but the number of reconstructed elements depends on the property Dew.Math.TDenseMtxVec.FFTStorageFormat. If that property is set to fsfPerm or to fsfPack, then all elements will be reconstructed after inverse transformation. If that property is set to fsfCCS (which is default), then the number of elements which will be reconstructed depends on the property Dew.Math.TDenseMtxVec.FFTOddLength and these rules will be followed:

  • Number of source columns and rows must be more than one. An exception will be raised otherwise;
  • if Dew.Math.TDenseMtxVec.FFTOddLength is set to False, elements in range [0..Cols-2] x [0..Rows-2] will be reconstructed;
  • if Dew.Math.TDenseMtxVec.FFTOddLength is set to True, elements in range [0..Cols-1] x [0..Rows-2] will be reconstructed; Here Cols and Rows are the number of columns and rows of the calling matrix after the inverse transformation.

Note
Both properties Dew.Math.TDenseMtxVec.FFTStorageFormat and Dew.Math.TDenseMtxVec.FFTOddLength must be set to the same values for forward and inverse transformation to get reversible results. NoScale parameter allows the scaling to be turned off.

See Also: TMtx.FFT2D, TMtx.FFT2DFromReal, TMtx.IFFT2D

Overload 2: TMtx IFFT2DToReal(Boolean NoScale)

Inverse two-dimentional Fast Fourier Transformation from complex to real.

#NameTypeDescription
1NoScaleBoolean

Result: stored in self (calling object), returns self for chaining

Remarks:

Transformation is applied in-place. Source matrix Complex property must be false, if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfPack or to fsfPack. Source matrix Complex property must be True, if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfCCS. The calling matrix becomes real. Size of the calling matrix is not changed if Dew.Math.TDenseMtxVec.FFTStorageFormat was set to fsfPack or to fsfPack. Size of calling matrix will be set to [Rows, 2*Cols], if Dew.Math.TDenseMtxVec.FFTStorageFormat is set to fsfCCS, i.e. matrix changes Dew.Math.TMtxVec.Complex property, but does not reallocate storage for elements. All elements are involved into inverse transformation, but number of reconstructed elements depends on the property Dew.Math.TDenseMtxVec.FFTStorageFormat. If that property is set to fsfPerm or to fsfPack, then all elements will be reconstructed after inverse transformation. If that property is set to fsfCCS (which is default), then the number of element's which will be reconstructed depends on the property Dew.Math.TDenseMtxVec.FFTOddLength and these rules will be followed:

  • Number of source columns and rows must be more than one. Exception will be raised otherwise;
  • if Dew.Math.TDenseMtxVec.FFTOddLength is set to False, elements in range [0..Cols-2] x [0..Rows-2] will be reconstructed;
  • if Dew.Math.TDenseMtxVec.FFTOddLength is set to True, elements in range [0..Cols-1] x [0..Rows-2] will be reconstructed;
  • Here Cols and Rows are the number of columns and rows of the calling matrix after the inverse transformation.

Note
Both properties Dew.Math.TDenseMtxVec.FFTStorageFormat and Dew.Math.TDenseMtxVec.FFTOddLength must be set to the same values for forward and inverse transformation to get reversible results. NoScale parameter allows the scaling to be turned off.

Examples
TMtx a;
MtxVec.CreateIt(out a);
try
    {
        a.SetIt (4,4,false,
        [1,  2,  3,  4,
        -5,  6, -7,  8,
        9, 12,-11, 10,
        16,-15,-14,  0]);

        a.FFTStorageFormat = fsfCCS;
        a.FFTOddLength = TRUE;

        // the next elements are involved into transformation
        [1, 2, 3,
        -5, 6, -7]

        a.FFT2DFromReal;
        // result will be
        // [(0,0), (-6, -10.39),
        //  (0,0), (3, 12.12),
        //  (12,12), (-11,10),
        //  (0,-15), (-14,0)]

        a.IFFT2DToReal;
        // [ 1,  2,  3, 0
        //  -5,  6, -7, 0
        //  12, 12,-11, 10
        //   0,-15,-14, 0]

        // the next elements are reconstructed
        // [ 1, 2, 3,  undef,
        //  -5, 6, -7, undef,
        //  undef, undef, undef, undef,
        //  undef, undef, undef, undef]
        //
        // if a.FFTOddLength is set to False,
        // then range of reconstruction would be one column less, i.e.
        // [ 1, 2, undef, undef,
        //  -5, 6, undef, undef,
        //  undef, undef, undef, undef,
        //  undef, undef, undef, undef]

    }
finally
    {
        MtxVec.FreeIt(ref a);
    }
See Also: TMtx.FFT2D, TMtx.FFT2DFromReal, TMtx.IFFT2D