ifft

Functions

int main(int argc, char *argv[])

ifft [ option ] [ infile ]

  • -l int

    • FFT length \((1 \le L)\)

  • -q int

    • input format

      • 0 real and imaginary parts

      • 1 real part

      • 2 imaginary part

  • -o int

    • output format

      • 0 real and imaginary parts

      • 1 real part

      • 2 imaginary part

  • infile str

    • double-type data sequence

  • stdout

    • double-type inverse FFT sequence

Parameters
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns

0 on success, 1 on failure.

See also

fft fftr

class sptk::InverseFastFourierTransform

Calculate inverse DFT of complex-valued input data.

The inputs are \(M\)-th order complex-valued data:

\[\begin{split} \begin{array}{cccc} \mathrm{Re}(X(0)), & \mathrm{Re}(X(1)), & \ldots, & \mathrm{Re}(X(M)), \\ \mathrm{Im}(X(0)), & \mathrm{Im}(X(1)), & \ldots, & \mathrm{Im}(X(M)). \end{array} \end{split}\]
The outputs are
\[\begin{split} \begin{array}{cccc} \mathrm{Re}(x(0)), & \mathrm{Re}(x(1)), & \ldots, & \mathrm{Re}(x(L-1)), \\ \mathrm{Im}(x(0)), & \mathrm{Im}(x(1)), & \ldots, & \mathrm{Im}(x(L-1)), \end{array} \end{split}\]
where \(L\) is the FFT length and must be a power of two.

Public Functions

explicit InverseFastFourierTransform(int fft_length)
Parameters

fft_length[in] FFT length, \(L\).

InverseFastFourierTransform(int num_order, int fft_length)
Parameters
  • num_order[in] Order of input, \(M\).

  • fft_length[in] FFT length, \(L\).

inline int GetNumOrder() const
Returns

Order of input.

inline int GetFftLength() const
Returns

FFT length.

inline bool IsValid() const
Returns

True if this object is valid.

bool Run(const std::vector<double> &real_part_input, const std::vector<double> &imag_part_input, std::vector<double> *real_part_output, std::vector<double> *imag_part_output) const
Parameters
  • real_part_input[in] \(M\)-th order real part of input.

  • imag_part_input[in] \(M\)-th order imaginary part of input.

  • real_part_output[out] \(L\)-length real part of output.

  • imag_part_output[out] \(L\)-length iaginary part of output.

Returns

True on success, false on failure.

bool Run(std::vector<double> *real_part, std::vector<double> *imag_part) const
Parameters
  • real_part[inout] Real part.

  • imag_part[inout] Imaginary part.

Returns

True on success, false on failure.