#include "log-fourier.hpp" #include #include int main(int argc, char* argv[]) { /* Model parameters */ unsigned p = 2; unsigned s = 2; Real λ = 0.5; Real τ₀ = 0; /* Log-Fourier parameters */ unsigned log2n = 8; Real Δτ = 0.1; Real k = 0.1; /* Iteration parameters */ Real β₀ = 0; Real βₘₐₓ = 0.7; Real Δβ = 0.01; int opt; while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:D:0:")) != -1) { switch (opt) { case 'p': p = atoi(optarg); break; case 's': s = atoi(optarg); break; case '2': log2n = atoi(optarg); break; case 't': τ₀ = atof(optarg); break; case 'b': βₘₐₓ = atof(optarg); break; case 'd': Δβ = atof(optarg); break; case 'k': k = atof(optarg); break; case 'D': Δτ = atof(optarg); break; case '0': β₀ = atof(optarg); break; default: exit(1); } } unsigned N = pow(2, log2n); LogarithmicFourierTransform fft(N, k, Δτ, 4); std::vector C(N); std::vector R(N); std::vector Ct(N); std::vector Rt(N); Real β = β₀; while (β += Δβ, β <= βₘₐₓ) { if (logFourierLoad(C, R, Ct, Rt, p, s, λ, τ₀, β, log2n, Δτ, k)) { Real e = energy(fft, C, R, p, s, λ, β); Real μ = estimateZ(fft, C, Ct, R, Rt, p, s, λ, τ₀, β); std::cout << p << " " << s << " " << λ << " " << τ₀ << " " << β << " " << μ << " " << Ct[0].real() << " " << e << std::endl; } } return 0; }