-
Notifications
You must be signed in to change notification settings - Fork 1
/
fft_ifft.h
37 lines (25 loc) · 1.34 KB
/
fft_ifft.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
#ifndef FFT_IFFT_H
#define FFT_IFFT_H
#include <stddef.h>
#include <stdint.h>
//----------------------------------------------//
/* тип, который будет использоваться в векторах */
typedef double number;
/* убрать комментарий, если необходимо хранение таблицы тригонометрических функций */
//#define TABLE
//----------------------------------------------//
/* Структура, используемая для хранения комплексных чисел */
typedef struct {
number Real;
number Imagine;
} complex;
/* прямое быстрое преобразование Фурье. Вход - массив in_vector типа number,
* выход - массив комплексных чисел типа complex, содержащих комплексные числа
* в алгебраической форме
*/
int fft(number* in_vector, complex* out_vector, size_t size);
/* обратное преобразование Фурье. Вход - массив комплексных чисел типа complex,
* содержащий комплексные числа в алгебраической форме, выход - массив типа complex
*/
int ifft(complex* in_vector, complex* out_vector, size_t size);
#endif