File smath.cpp
This file contains mathemical routines.
- Author
Benjamin Lindner ben@benlabs.net
- Version
See VERSION in CMakeLists.txt
- Copyright
GNU General Public License
-
namespace smath
Functions
-
void auto_correlate_direct(fftw_complex *data, size_t N)
Replaces the data within the array with its auto-correlated value using FFT (scales with N)
-
void auto_correlate_fftw(std::vector<std::complex<double>> &data, size_t N, fftw_plan p1, fftw_plan p2, fftw_complex *fftw_planspace)
-
template<class T>
void auto_correlate_fftw(std::vector<std::complex<T>> &data, fftw_plan p1, fftw_plan p2)
-
void auto_correlate_fftw(fftw_complex *data, fftw_plan p1, fftw_plan p2, size_t NF)
Replaces the data within the array with its auto-correlated value using FFT (scales with N)
-
void square_elements(fftw_complex *data, size_t N)
Element-wise squaring of an array
-
void multiply_elements(const double factor, fftw_complex *data, size_t NF)
Element-wise multiplication of an array
-
template<class T>
void add_elements(std::vector<std::complex<T>> &target, const std::vector<std::complex<T>> &source)
-
void add_elements(fftw_complex *target, const fftw_complex *source, size_t NF)
Element-wise addition of two arrays
-
void auto_correlate_direct(fftw_complex *data, size_t N)