Fourier Transformation Algorithms
dft.h
Go to the documentation of this file.
1 #ifndef DFT_H
2 #define DFT_H
3 
4 #include "../helperlib/helper.h"
5 #include "../helperlib/fourier.h"
6 
7 namespace DFT
8 {
10  {
11  return {};
12  }
13 };
14 
15 TEST_SUITE("Fourier test suite") {
16  TEST_CASE ("DFT test") {
18  REQUIRE(data);
19 
20  Fourier::Coefficients expectedResults = FourierHelper::ParseOutputDataFile("testResults.txt");
21  REQUIRE(expectedResults);
22 
23  Fourier::Coefficients coefficients = DFT::Solve(data);
24 
25  CHECK(Fourier::Equal(expectedResults, coefficients));
26  }
27 }
28 
29 #endif
DFT
Definition: dft.h:8
Fourier::InputData
The input data to perform a fourier transformation.
Definition: fourier.h:19
FourierHelper::ParseInputDataFile
Fourier::InputData ParseInputDataFile(const std::string &inputData)
Transforms input data of the form x;y into Fourier:InputData datastruct.
Definition: helper.cpp:9
FourierHelper::ParseOutputDataFile
Fourier::Coefficients ParseOutputDataFile(const std::string &coefficients)
Transforms coefficients of the form i;x;y into Fourier:Coefficients datastruct.
Definition: helper.cpp:36
DFT::Solve
Fourier::Coefficients Solve(const Fourier::InputData &data)
Definition: dft.h:9
Fourier::Equal
bool Equal(const Coefficients &expected, const Coefficients &result)
Compares two coefficient lists of the same size.
Definition: fourier.cpp:5
Fourier::Coefficients
The resulting coefficients of a fourier transformation.
Definition: fourier.h:43
TEST_SUITE
TEST_SUITE("Fourier test suite")
Definition: dft.h:15