Accord.Math.Transforms.FourierTransform2.IDFT C# (CSharp) Method

IDFT() private static method

Computes the inverse discrete Fourier transform (IDFT) of the given complex vector, storing the result back into the vector. The vector can have any length. This is a wrapper function. This transform does not perform scaling, so the inverse is not a true inverse.
private static IDFT ( Complex data ) : void
data Complex
return void
        private static void IDFT(Complex[] data)
        {
            int n = data.Length;

            if (n == 0)
                return;

            for (int i = 0; i < data.Length; i++)
                data[i] = new Complex(data[i].Imaginary, data[i].Real);

            if ((n & (n - 1)) == 0)
            {
                // Is power of 2
                TransformRadix2(data);
            }
            else
            {
                // More complicated algorithm for arbitrary sizes
                TransformBluestein(data);
            }

            for (int i = 0; i < data.Length; i++)
            {
                double im = data[i].Imaginary;
                double re = data[i].Real;
                data[i] = new Complex(im, re);
            }
        }

Same methods

FourierTransform2::IDFT ( double real, double imag ) : void