#pragma once #include "types.hpp" #include #include #include #include class LogarithmicFourierTransform { private: Complex* a; Complex* â; fftw_plan a_to_â; fftw_plan â_to_a; unsigned N; unsigned pad; Real k; Real Δτ; Real τₛ; Real ωₛ; Real sₛ; public: LogarithmicFourierTransform(unsigned N, Real k, Real Δτ, unsigned pad = 4); ~LogarithmicFourierTransform(); Real τ(unsigned n) const; Real ω(unsigned n) const; Real t(unsigned n) const; Real ν(unsigned n) const; Real s(unsigned n) const; std::vector fourier(const std::vector& c, bool symmetric); std::vector inverse(const std::vector& ĉ); }; std::string logFourierFile(std::string prefix, unsigned p, unsigned s, Real λ, Real τ₀, Real β, unsigned log2n, Real Δτ, Real k); void logFourierSave(const std::vector& C, const std::vector& R, const std::vector& Ct, const std::vector& Rt, unsigned p, unsigned s, Real λ, Real τ₀, Real β, unsigned log2n, Real Δτ, Real k); bool logFourierLoad(std::vector& C, std::vector& R, std::vector& Ct, std::vector& Rt, unsigned p, unsigned s, Real λ, Real τ₀, Real β, unsigned log2n, Real Δτ, Real k); std::tuple, std::vector> RddfCtdfCt(LogarithmicFourierTransform& fft, const std::vector& C, const std::vector& R, unsigned p, unsigned s, Real λ); Real estimateZ(LogarithmicFourierTransform& fft, const std::vector& C, const std::vector& Ct, const std::vector& R, const std::vector& Rt, unsigned p, unsigned s, Real λ, Real τ₀, Real β); Real energy(const LogarithmicFourierTransform& fft, std::vector& C, const std::vector& R, unsigned p, unsigned s, Real λ, Real β);