diff --git a/algorithms/math/fast-fourrier-transform.cpp b/algorithms/math/fast-fourrier-transform.cpp deleted file mode 100644 index b930d34c..00000000 --- a/algorithms/math/fast-fourrier-transform.cpp +++ /dev/null @@ -1,29 +0,0 @@ -template -void fft(vector>& xs) { - int N = (int)xs.size(); - - if (N == 1) return; - - vector> es(N / 2), os(N / 2); - - for (int i = 0; i < N / 2; ++i) es[i] = xs[2 * i]; - - for (int i = 0; i < N / 2; ++i) os[i] = xs[2 * i + 1]; - - fft(es); - fft(os); - - auto signal = (invert ? 1 : -1); - auto theta = 2 * signal * acos(-1) / N; - complex S{1}, S1{cos(theta), sin(theta)}; - - for (int i = 0; i < N / 2; ++i) { - xs[i] = (es[i] + S * os[i]); - xs[i] /= (invert ? 2 : 1); - - xs[i + N / 2] = (es[i] - S * os[i]); - xs[i + N / 2] /= (invert ? 2 : 1); - - S *= S1; - } -} diff --git a/algorithms/math/fast-fourrier-transform.tex b/algorithms/math/fast-fourrier-transform.tex deleted file mode 100644 index bc5693b9..00000000 --- a/algorithms/math/fast-fourrier-transform.tex +++ /dev/null @@ -1 +0,0 @@ -\subsection{Fast Fourrier Transform}