-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestFFT.h
50 lines (44 loc) · 1.41 KB
/
testFFT.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* API of some test cases for the FFT algorithms
*
* @version 1.0
* @date 2023-07-10
* @file testFFT.h
* @author Richard Saeuberlich ([email protected])
*/
#pragma once
#include <stddef.h>
#include <stdbool.h>
#include <complex.h>
/**
* Create an array which will be used to hold data in form of complex floating point values.
* With this approach you may enter
*
* If 'realSize' does not equal 'size', the different entries will be zero padded.
*
* Example: Size = 1000 will be rounded to 1024 = 2^10.
*
* @param size Number of samples/data points
* @param realSize Number of samples/data points with zero padding
* @return float* Array with results
*/
float complex* createDataArray(size_t size, size_t realSize);
/**
* Starts some tests for implemented FFT algorithms.
*/
bool testFFTAlgorithms();
/**
* Makes a DFT & and FFT (Cooley-Tukey) with preset values and shows/prints,
* the difference between these 2 algorithms.
*/
void showDifferenceDFTandCooleyTukeyRecursive();
/**
* Makes a DFT & and FFT (Cooley-Tukey) with preset values and shows/prints,
* the difference between these 2 algorithms.
*/
void showDifferenceDFTandCooleyTukeyIterative();
/**
* Makes a 2 FFTs (Cooley-Tukey recursive & Cooley-Tukey iterative) with preset
* values and shows/prints, the difference between these 2 algorithms.
*/
void showDifferenceCooleyTukeyRecursiveAndCooleyTukeyIterative();