Added MACS source
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / fft / gsl_fft_real.h
1 /* fft/gsl_fft_real.h
2  * 
3  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
4  * 
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.
9  * 
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.
14  * 
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.
18  */
19
20 #ifndef __GSL_FFT_REAL_H__
21 #define __GSL_FFT_REAL_H__
22
23 #include <stddef.h>
24
25 #include <gsl/gsl_math.h>
26 #include <gsl/gsl_complex.h>
27 #include <gsl/gsl_fft.h>
28
29 #undef __BEGIN_DECLS
30 #undef __END_DECLS
31 #ifdef __cplusplus
32 # define __BEGIN_DECLS extern "C" {
33 # define __END_DECLS }
34 #else
35 # define __BEGIN_DECLS /* empty */
36 # define __END_DECLS /* empty */
37 #endif
38
39 __BEGIN_DECLS
40
41 int gsl_fft_real_radix2_transform (double data[], const size_t stride, const size_t n) ;
42
43 typedef struct
44   {
45     size_t n;
46     size_t nf;
47     size_t factor[64];
48     gsl_complex *twiddle[64];
49     gsl_complex *trig;
50   }
51 gsl_fft_real_wavetable;
52
53 typedef struct
54   {
55     size_t n;
56     double *scratch;
57   }
58 gsl_fft_real_workspace;
59
60 gsl_fft_real_wavetable * gsl_fft_real_wavetable_alloc (size_t n);
61
62 void  gsl_fft_real_wavetable_free (gsl_fft_real_wavetable * wavetable);
63
64 gsl_fft_real_workspace * gsl_fft_real_workspace_alloc (size_t n);
65
66 void  gsl_fft_real_workspace_free (gsl_fft_real_workspace * workspace);
67
68
69 int gsl_fft_real_transform (double data[], const size_t stride, const size_t n,
70                             const gsl_fft_real_wavetable * wavetable,
71                             gsl_fft_real_workspace * work);
72
73
74 int gsl_fft_real_unpack (const double real_coefficient[],
75                          double complex_coefficient[],
76                          const size_t stride, const size_t n);
77
78 __END_DECLS
79
80 #endif /* __GSL_FFT_REAL_H__ */