Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / fft / gsl_fft_halfcomplex.h
1 /* fft/gsl_fft_halfcomplex.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_HALFCOMPLEX_H__
21 #define __GSL_FFT_HALFCOMPLEX_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 #include <gsl/gsl_fft_real.h>
29
30 #undef __BEGIN_DECLS
31 #undef __END_DECLS
32 #ifdef __cplusplus
33 # define __BEGIN_DECLS extern "C" {
34 # define __END_DECLS }
35 #else
36 # define __BEGIN_DECLS /* empty */
37 # define __END_DECLS /* empty */
38 #endif
39
40 __BEGIN_DECLS
41
42 int gsl_fft_halfcomplex_radix2_backward (double data[], const size_t stride, const size_t n);
43 int gsl_fft_halfcomplex_radix2_inverse (double data[], const size_t stride, const size_t n);
44 int gsl_fft_halfcomplex_radix2_transform (double data[], const size_t stride, const size_t n);
45
46 typedef struct
47   {
48     size_t n;
49     size_t nf;
50     size_t factor[64];
51     gsl_complex *twiddle[64];
52     gsl_complex *trig;
53   }
54 gsl_fft_halfcomplex_wavetable;
55
56 gsl_fft_halfcomplex_wavetable * gsl_fft_halfcomplex_wavetable_alloc (size_t n);
57
58 void
59 gsl_fft_halfcomplex_wavetable_free (gsl_fft_halfcomplex_wavetable * wavetable);
60
61
62 int gsl_fft_halfcomplex_backward (double data[], const size_t stride, const size_t n,
63                                   const gsl_fft_halfcomplex_wavetable * wavetable,
64                                   gsl_fft_real_workspace * work);
65
66 int gsl_fft_halfcomplex_inverse (double data[], const size_t stride, const size_t n,
67                                  const gsl_fft_halfcomplex_wavetable * wavetable,
68                                  gsl_fft_real_workspace * work);
69
70 int gsl_fft_halfcomplex_transform (double data[], const size_t stride, const size_t n,
71                                    const gsl_fft_halfcomplex_wavetable * wavetable,
72                                    gsl_fft_real_workspace * work);
73
74 int
75 gsl_fft_halfcomplex_unpack (const double halfcomplex_coefficient[],
76                             double complex_coefficient[],
77                             const size_t stride, const size_t n);
78
79 int
80 gsl_fft_halfcomplex_radix2_unpack (const double halfcomplex_coefficient[],
81                                    double complex_coefficient[],
82                                    const size_t stride, const size_t n);
83
84 __END_DECLS
85
86 #endif /* __GSL_FFT_HALFCOMPLEX_H__ */