#include "log-fourier.hpp" #include #include int main(int argc, char* argv[]) { /* Log-Fourier parameters */ unsigned log2n = 8; Real Δτ = 0.1; Real k = 0.1; unsigned pad = 4; int opt; while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:P:")) != -1) { switch (opt) { case '2': log2n = atoi(optarg); break; case 'k': k = atof(optarg); break; case 'D': Δτ = atof(optarg); break; case 'P': pad = atoi(optarg); break; default: exit(1); } } unsigned N =log2n; LogarithmicFourierTransform fft(N, k, Δτ, pad); std::vector a(N); for (unsigned i = 0; i < N; i++) { a[i] = 1 / (1 + pow(fft.ν(i), 2)); } std::vector â = fft.inverse(a); for (unsigned i = 0; i < N; i++) { std::cout << fft.t(i) << " " << â[i] << std::endl; } return 0; }