/* Performs an in-place Fourier transform of the vector. The results is stored in the so-called "half-complex" format (see http://www.fftw.org/fftw3_doc/The-Halfcomplex_002dformat-DFT.html for more information). */ static VALUE dvector_fft(VALUE self) { long len; double * values = Dvector_Data_for_Write(self, &len); fftw_plan plan = fftw_plan_r2r_1d(len, values, values, FFTW_R2HC, FFTW_ESTIMATE); fftw_execute(plan); fftw_destroy_plan(plan); return self; }