diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2023-02-27 15:37:24 +0100 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2023-02-27 15:49:27 +0100 |
| commit | b067d9880606143ac4b860beff4d5b02e7d349bd (patch) | |
| tree | a269c8c18c0adf05d63df08bab6d3594fee1311f /math/transforms | |
| parent | 208388a728ee7d7ea8f33952a15bb71c27740e50 (diff) | |
improved math
Diffstat (limited to 'math/transforms')
| -rw-r--r-- | math/transforms/fft.cpp | 2 | ||||
| -rw-r--r-- | math/transforms/fftPerm.cpp | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/math/transforms/fft.cpp b/math/transforms/fft.cpp index 4540ed8..6c5f5a8 100644 --- a/math/transforms/fft.cpp +++ b/math/transforms/fft.cpp @@ -1,4 +1,4 @@ -using cplx = complex<double>; // Eigene Implementierung ist schneller. +using cplx = complex<double>; void fft(vector<cplx>& a, bool inverse = 0) { int n = sz(a); diff --git a/math/transforms/fftPerm.cpp b/math/transforms/fftPerm.cpp deleted file mode 100644 index 2b6fb10..0000000 --- a/math/transforms/fftPerm.cpp +++ /dev/null @@ -1,8 +0,0 @@ -int perm[MAXN]; //perm[i] = j in Zeile 10 -void genPerm(int n){ - ull mask = ~0ull << (__lg(n) - 1); - for (int i = 0, j = 0; i < n; i++) { - perm[i] = j; //if (i < j) swap(a[i], a[j]); - ull y = mask >> __builtin_ctz(~i); - j ^= y & (n - 1); -}} |
