-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFFT.h
More file actions
35 lines (28 loc) · 871 Bytes
/
FFT.h
File metadata and controls
35 lines (28 loc) · 871 Bytes
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
// fft.h - declaration of class
// of fast Fourier transform - FFT
//
// The code is property of LIBROW
// You can use it on your own
// When utilizing credit LIBROW site
#pragma once
#include <math.h>
#include "complex.h"
#include "Array1D.h"
class FFT
{
public:
//FORWARD FOURIER TRANSFORM, INPLACE VERSION
//Data - both input data and output
static bool Forward(cArray1D *data);
//INVERSE FOURIER TRANSFORM, INPLACE VERSION
//Data - both input data and output
//Scale - if to scale result
static bool Inverse(cArray1D *data, const bool Scale = true);
protected:
//Rearrange function and its inplace version
static void Rearrange(cArray1D *data);
//FFT implementation
static void Perform(cArray1D *data, const bool Inverse = false);
//Scaling of inverse FFT result
static void Scale(cArray1D *data);
};