6#include "debugtrace.hpp"
9using rte = std::runtime_error;
14#define lin0N arma::linspace(0, N - 1, N)
17 return arma::pow(arma::sin((arma::datum::pi/N) *
lin0N), 2);
20 d alpha = 25.0 / 46.0;
24 d a0 = 7938. / 18608.;
25 d a1 = 9240. / 18608.;
26 d a2 = 1430. / 18608.;
34 return 1 - arma::abs(2 * (
lin0N - (N - 1) / 2.) / N);
static vd create(const WindowType w, const us len)
Dispatcher: create a window based on enum type and len.
static vd bartlett(const us len)
Bartlett window.
static vd hamming(const us len)
Hamming window.
static vd hann(const us len)
Hann window.
static vd blackman(const us len)
Blackman window.
static vd rectangular(const us len)
Rectangular (boxcar) window.
size_t us
We often use boolean values.