1 /* fft/gsl_fft_complex.h
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __GSL_FFT_COMPLEX_H__
21 #define __GSL_FFT_COMPLEX_H__
25 #include <gsl/gsl_math.h>
26 #include <gsl/gsl_complex.h>
27 #include <gsl/gsl_fft.h>
32 # define __BEGIN_DECLS extern "C" {
33 # define __END_DECLS }
35 # define __BEGIN_DECLS /* empty */
36 # define __END_DECLS /* empty */
41 /* Power of 2 routines */
44 int gsl_fft_complex_radix2_forward (gsl_complex_packed_array data,
48 int gsl_fft_complex_radix2_backward (gsl_complex_packed_array data,
52 int gsl_fft_complex_radix2_inverse (gsl_complex_packed_array data,
56 int gsl_fft_complex_radix2_transform (gsl_complex_packed_array data,
59 const gsl_fft_direction sign);
61 int gsl_fft_complex_radix2_dif_forward (gsl_complex_packed_array data,
65 int gsl_fft_complex_radix2_dif_backward (gsl_complex_packed_array data,
69 int gsl_fft_complex_radix2_dif_inverse (gsl_complex_packed_array data,
73 int gsl_fft_complex_radix2_dif_transform (gsl_complex_packed_array data,
76 const gsl_fft_direction sign);
78 /* Mixed Radix general-N routines */
85 gsl_complex *twiddle[64];
88 gsl_fft_complex_wavetable;
95 gsl_fft_complex_workspace;
98 gsl_fft_complex_wavetable *gsl_fft_complex_wavetable_alloc (size_t n);
100 void gsl_fft_complex_wavetable_free (gsl_fft_complex_wavetable * wavetable);
102 gsl_fft_complex_workspace *gsl_fft_complex_workspace_alloc (size_t n);
104 void gsl_fft_complex_workspace_free (gsl_fft_complex_workspace * workspace);
106 int gsl_fft_complex_memcpy (gsl_fft_complex_wavetable * dest,
107 gsl_fft_complex_wavetable * src);
110 int gsl_fft_complex_forward (gsl_complex_packed_array data,
113 const gsl_fft_complex_wavetable * wavetable,
114 gsl_fft_complex_workspace * work);
116 int gsl_fft_complex_backward (gsl_complex_packed_array data,
119 const gsl_fft_complex_wavetable * wavetable,
120 gsl_fft_complex_workspace * work);
122 int gsl_fft_complex_inverse (gsl_complex_packed_array data,
125 const gsl_fft_complex_wavetable * wavetable,
126 gsl_fft_complex_workspace * work);
128 int gsl_fft_complex_transform (gsl_complex_packed_array data,
129 const size_t stride, const size_t n,
130 const gsl_fft_complex_wavetable * wavetable,
131 gsl_fft_complex_workspace * work,
132 const gsl_fft_direction sign);
136 #endif /* __GSL_FFT_COMPLEX_H__ */