Math 快速傅里叶变换伪码?
下面代码的目的是将多项式从系数表示转换为值表示,方法是将其划分为奇偶次幂,然后在较小的多项式上递归Math 快速傅里叶变换伪码?,math,language-agnostic,computer-science,Math,Language Agnostic,Computer Science,下面代码的目的是将多项式从系数表示转换为值表示,方法是将其划分为奇偶次幂,然后在较小的多项式上递归 function FFT(A, w) Input: Coefficient representation of a polynomials A(x) of degree ≤ n-1, where n is a power of 2w, an nth root of unity. Output: Value representation A(w^0),...,A(w^(n-1)) if w
function FFT(A, w)
Input: Coefficient representation of a polynomials A(x) of degree ≤ n-1, where n
is a power of 2w, an nth root of unity.
Output: Value representation A(w^0),...,A(w^(n-1))
if w = 1; return A(1)
express A(x) in the form A_e(x^2) and xA_o(x^2) /*where A_e are the even powers and A_o
the odd.*/
call FFT(A_e,w^2) to evaluate A_e at even of powers of w
call FFT(A_o,w^2) to evaluate A_o at even powers of w
for j = 0 to n-1;
compute A(w^j) = A_e(w^(2j))+w^j(A_o(w^(2j)))
return A(w^0),...,A(w^(n-1))
你能扩展一下吗?我没有最强的数学基础——时间与这个有什么关系,什么是频率空间?请注意,我没有数学傅里叶变换/模型的经验。这是唯一的体验。第二,什么是递归?对A_e和A_o调用FFT不就是递归吗?老兄,FFT是关于数学的。如果你不知道,你就无法理解算法。它有助于了解什么是傅里叶变换-三角函数,复变量,一点微积分。一旦你有了它,你需要知道为什么离散算法是重要的。在这里,请某人在没有任何背景的情况下向你解释,就像让某人在不懂物理的情况下告诉你如何向月球发射火箭一样。我确实有一些数学知识。包含这个问题的书只提供了一些关于单位根的信息,以及一些关于复数的信息。我认为这足够数学来回答这个问题,因为这本书没有提到其他任何东西。你能不能在回答问题的时候,在专注于计算机科学的同时,使用数学。它解释了算法,为什么它是重要的,等等。这本书将包括什么?数学……离不开它。FFT的每一次讨论都将假定对三角函数、微积分、级数、复变量和傅里叶变换的了解。