test_eigen_fft.cxx
Go to the documentation of this file.
1 #include <Eigen/Dense>
2 
3 #include <unsupported/Eigen/FFT>
4 
5 #include <iostream>
6 using namespace std;
7 
8 int main()
9 {
10  Eigen::FFT<float> fft;
11  std::vector<float> timevec = {1,2,3,2,1};
12  std::vector<std::complex<float> > freqvec;
13 
14  fft.fwd( freqvec,timevec);
15  // manipulate freqvec
16  fft.inv( timevec,freqvec);
17 
18  for (auto x: timevec) {
19  cerr << x << " ";
20  }
21  cerr << endl;
22  for (auto x: freqvec) {
23  cerr << x << " ";
24  }
25  cerr << endl;
26 
27  // stored "plans" get destroyed with fft destructor
28 
29  return 0;
30 }
int main()
STL namespace.
list x
Definition: train.py:276
QTextStream & endl(QTextStream &s)