Fin de l'implémentation des fonctions
This commit is contained in:
parent
79e8e2cedd
commit
37fcd07631
1 changed files with 8 additions and 5 deletions
|
@ -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<opt_size-input.size(); ++i) {
|
||||
sig.push_back(complex(0, 0));
|
||||
}
|
||||
return fft_rec(sig);
|
||||
};
|
||||
|
||||
contour coef2cont(const csignal& tfd, complex mean, int size, int cmax) {
|
||||
contour cont;
|
||||
auto tf_it = tfd.begin();
|
||||
auto cont_it = cont.begin();
|
||||
//TODO: trouver les bonnes valeurs
|
||||
int kmin = 0;
|
||||
int kmax = 2*cmax;
|
||||
int kmin = tfd.size()/2 - cmax;
|
||||
int kmax = tfd.size()/2 + cmax;
|
||||
|
||||
for (int m=0; m<tfd.size(); ++m) {
|
||||
complex sum;
|
||||
|
|
Loading…
Reference in a new issue