/* 
   Performs a reverse in-place Fourier transform of the vector. The
   original data must have been stored in the so called "half-complex"
   format (see #fft!).
*/

static VALUE dvector_rfft(VALUE self)
{
  long len;
  double * values = Dvector_Data_for_Write(self, &len);
  fftw_plan plan = fftw_plan_r2r_1d(len, values, values,
                                    FFTW_HC2R, FFTW_ESTIMATE);
  fftw_execute(plan);
  fftw_destroy_plan(plan);
  return self;
}