From b08665e8d9379e0c884f046023269c8510f4ac6c Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Tue, 6 Mar 2018 07:43:48 +0100 Subject: [PATCH] renamed Window to WinFunc and Taps to Window --- window.hh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/window.hh b/window.hh index fd71b2e..b0d9bc1 100644 --- a/window.hh +++ b/window.hh @@ -13,17 +13,17 @@ Copyright 2018 Ahmet Inan namespace DSP { template -struct Window +struct WinFunc { virtual TYPE operator () (int, int) = 0; }; template -class Taps +class Window { TYPE w[TAPS]; public: - Taps(Window *func) + Window(WinFunc *func) { for (int n = 0; n < TAPS; ++n) w[n] = (*func)(n, TAPS); @@ -41,13 +41,13 @@ public: }; template -struct Rect : public Window +struct Rect : public WinFunc { TYPE operator () (int n, int N) { return n >= 0 && n < N ? 1 : 0; } }; template -struct Hann : public Window +struct Hann : public WinFunc { TYPE operator () (int n, int N) { @@ -56,7 +56,7 @@ struct Hann : public Window }; template -struct Hamming : public Window +struct Hamming : public WinFunc { TYPE operator () (int n, int N) { @@ -65,7 +65,7 @@ struct Hamming : public Window }; template -class Lanczos : public Window +class Lanczos : public WinFunc { static TYPE sinc(TYPE x) { @@ -79,7 +79,7 @@ public: }; template -class Blackman : public Window +class Blackman : public WinFunc { TYPE a0, a1, a2; public: @@ -94,7 +94,7 @@ public: }; template -class Gauss : public Window +class Gauss : public WinFunc { TYPE o; public: @@ -106,7 +106,7 @@ public: }; template -class Kaiser : public Window +class Kaiser : public WinFunc { TYPE a; /*