00001 namespace FFT { 00002 00003 /// 00004 /// Discrete Fourier Transformation. 00005 /// 00006 /// This interface specifies two functions: 00007 /// -# Discrete Fourier Transform, which takes a vector of cooeficients 00008 /// \f$ \mathbf{a}=[a_0,\ldots,a_{n-1}] \f$ 00009 /// of a polynomial 00010 /// \f$ A(x) = a_{n-1} * x^{n-1} + \ldots + a_1 * x + a_0 \f$ 00011 /// and returns the vector of values 00012 /// \f$ \mathbf{y}=[A(\omega_n^0),\ldots,A(\omega_n^{n-1})] \f$, 00013 /// where \f$ \omega_n \f$ is the <em> primitive n-th root of unity</em>, i.e. 00014 /// the complex number such that \f$ argument(\omega_n)=\frac{2\pi}{n} \f$ and 00015 /// \f$ modulus(\omega_n)=1 \f$. 00016 /// -# Inverse Discrete Fourier Transform, which takes the vector of values 00017 /// \f$ \mathbf{y}=[y_0,\ldots,y_{n-1}] \f$ 00018 /// and returns the vector of cooeficients 00019 /// \f$ \mathbf{a}=[a_0,\ldots,a_{n-1}] \f$ 00020 /// of a polynomial 00021 /// \f$ A(x) = a_{n-1} * x^{n-1} + \ldots + a_1 * x + a_0 \f$ 00022 /// such that \f$ y_i = A(\omega_n^i) \f$ for \f$ i\in\{1,\ldots,n-1\} \f$, 00023 /// where \f$ \omega_n \f$ is the <em> primitive n-th root of unity</em>. 00024 /// 00025 /// For ease of implementation the n can be assumed to be a power of 2. 00026 public interface IDFT 00027 { 00028 /// 00029 /// Discrete Fourier Transform. 00030 /// 00031 /// \param a table whos length is a power of 2. 00032 /// 00033 Complex[] DFT (Complex[] a); 00034 00035 /// 00036 /// Inverse Discrete Fourier Transform. 00037 /// 00038 /// \param y table whos length is a power of 2. 00039 /// 00040 Complex[] InverseDFT(Complex[] y); 00041 00042 /// 00043 /// Name of the DFT algorithm. 00044 /// 00045 string ToString(); 00046 } 00047 }