#pragma once
#include "types.hpp"

#include <cmath>
#include <fftw3.h>
#include <vector>
#include <gsl/gsl_sf_gamma.h>

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<Complex> fourier(const std::vector<Real>& c, bool symmetric);
  std::vector<Real> inverse(const std::vector<Complex>& ĉ);
};