From 37fcd076310e98824790d543e1c19938c66129f6 Mon Sep 17 00:00:00 2001 From: Guillaume Courrier Date: Tue, 26 Nov 2019 14:22:52 +0100 Subject: [PATCH] =?UTF-8?q?Fin=20de=20l'impl=C3=A9mentation=20des=20foncti?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/src/math.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/src/math.hpp b/tests/src/math.hpp index 77a2b3c..fe5c556 100644 --- a/tests/src/math.hpp +++ b/tests/src/math.hpp @@ -78,17 +78,20 @@ namespace math { } csignal fft(const csignal& input) { - //TODO: s'assurer que le signal est bien formé (i.e. bonne taille) - return fft_rec(input); + int opt_size = 1 << (int)std::ceil(std::log(input.size())/std::log(2)); + csignal sig(input); + for (int i=0; i