2018-05-15 18:31:41 -07:00
|
|
|
#ifndef ALCOMPLEX_H
|
|
|
|
#define ALCOMPLEX_H
|
|
|
|
|
2018-11-17 04:14:57 -08:00
|
|
|
#include <complex>
|
2018-05-15 18:31:41 -07:00
|
|
|
|
2019-06-08 16:05:18 -07:00
|
|
|
#include "alspan.h"
|
|
|
|
|
2018-05-15 18:31:41 -07:00
|
|
|
/**
|
|
|
|
* Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is
|
2019-06-08 16:05:18 -07:00
|
|
|
* FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier
|
|
|
|
* Transform (DFT) of the time domain data stored in the buffer. The buffer is
|
|
|
|
* an array of complex numbers, and MUST BE power of two.
|
2018-05-15 18:31:41 -07:00
|
|
|
*/
|
2019-06-08 16:05:18 -07:00
|
|
|
void complex_fft(const al::span<std::complex<double>> buffer, const double sign);
|
2018-05-15 18:31:41 -07:00
|
|
|
|
2018-05-20 17:21:50 +02:00
|
|
|
/**
|
2018-05-24 00:16:50 -07:00
|
|
|
* Calculate the complex helical sequence (discrete-time analytical signal) of
|
|
|
|
* the given input using the discrete Hilbert transform (In-place algorithm).
|
2019-06-08 16:05:18 -07:00
|
|
|
* Fills the buffer with the discrete-time analytical signal stored in the
|
|
|
|
* buffer. The buffer is an array of complex numbers and MUST BE power of two.
|
2018-05-20 17:21:50 +02:00
|
|
|
*/
|
2019-06-08 16:05:18 -07:00
|
|
|
void complex_hilbert(const al::span<std::complex<double>> buffer);
|
2018-05-15 18:31:41 -07:00
|
|
|
|
|
|
|
#endif /* ALCOMPLEX_H */
|