跳到主要内容
uencoder

Use 快 Fourier Transform

FFT computes discrete Fourier 转换在 O(n 记录 n) 而非 O(n^2). Used 在信号过程, 多项式 multiplication, 和音频分析.

  1. 1

    FFT converts 信号从 时间域 到频率域. 它 decomposes 信号为 其频率 components. DFT 是 O(n^2); FFT (Cooley-Tukey) 是 O(n 记录 n) 通过 recursively splitting even 和 odd indices. Requirements: 输入长度应该是 power 的 2 (零-pad 如果不). Applications: 音频过程, 图像压缩 (JPEG), 多项式 multiplication, 卷积.

  2. 2
    复数乘法 →

    FFT 我们复杂 arithmetic. twiddle factors 是复杂 roots 的 unity: e^(-2πi k/n). 此 tool performs 复杂 multiplication, 哪个是 核心操作在 FFT butterfly. 每个 butterfly combines two 复杂 values 具有 twiddle 因子.

  3. 3
    多项式求值器 →

    FFT 能够 multiply polynomials 在 O(n 记录 n) 而非 O(n^2): evaluate 两者 polynomials 在 n-th roots 的 unity (FFT), multiply pointwise, 然后 interpolate (inverse FFT). 此是 faster than direct 系数 multiplication 为大 polynomials.

常见问题

什么是 差集之间 DFT 和 FFT?
DFT (Discrete Fourier Transform) 是 mathematical 定义 — O(n^2). FFT (快 Fourier Transform) 是 algorithm 该 computes DFT 在 O(n 记录 n) 通过 exploiting symmetry 和 recursion. 结果是 identical; FFT 是仅 much faster. 为 n=1024, FFT 是 ~100x faster than DFT.
为什么必须输入长度是 power 的 2?
Cooley-Tukey FFT algorithm recursively splits 输入为 even 和 odd halves. 此 requires 长度到 是 power 的 2. 为其他 lengths, 零-pad 到下一个 power 的 2, 或 use mixed-基数 FFT (supports lengths 该是 products 的小 primes). 最多 FFT libraries 处理 non-power-of-2 lengths automatically.

相关工具