Utilities.hpp 842 Bytes
Newer Older
1
2
3
#ifndef TOOLS_HPP
#define TOOLS_HPP

4
5
6
#include "RVector.hpp"
#include "CVector.hpp"
#include "RMatrix.hpp"
niklas.baumgarten's avatar
niklas.baumgarten committed
7
#include "CMatrix.hpp"
8

9
10
#include <vector>
#include <string>
11
#include <math.h>
niklas.baumgarten's avatar
niklas.baumgarten committed
12
#include <fftw3.h>
13
14
15
16
17


template<typename T>
std::string vec2str(std::vector<T> vec);

niklas.baumgarten's avatar
niklas.baumgarten committed
18
19
void fft(int N, fftw_complex *in, fftw_complex *out);

20
void fft(const CVector &in, CVector &out);
niklas.baumgarten's avatar
niklas.baumgarten committed
21

22
void fft(const RVector &in, RVector &out);
niklas.baumgarten's avatar
niklas.baumgarten committed
23
24
25
26
27
28
29
30
31
32
33
34

void fft2(int N2, int N1, fftw_complex *in, fftw_complex *out);

void fft2(const std::vector<std::vector<std::complex<double>>> &in,
          std::vector<std::vector<std::complex<double>>> &out);

void fft2(const std::vector<std::vector<double>> &in,
          std::vector<std::vector<double>> &out);

std::vector<double> linspace(const double &start,
                             const double &end, int num);

35
#endif //TOOLS_HPP