#ifndef GSL_FFT_HPP #define GSL_FFT_HPP #include #include #include #include int fft(std::vector >& data, int direction){ int status; const size_t stride=1; size_t n; n = data.size(); double* pdata = &data[0].real(); if(direction>0){ status = gsl_fft_complex_radix2_forward(pdata, stride, n); } else { status = gsl_fft_complex_radix2_backward(pdata, stride, n); } if(status!=GSL_SUCCESS) return 1; return 0; } #endif