File: SF.i

package info (click to toggle)
libmath-gsl-perl 0.45-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 192,156 kB
  • sloc: ansic: 895,524; perl: 24,682; makefile: 12
file content (242 lines) | stat: -rw-r--r-- 9,808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
%module "Math::GSL::SF"
%include "typemaps.i"
%include "gsl_typemaps.i"
%include "renames.i"
%include "system.i"

#define  GSL_DISABLE_DEPRECATED 1

%apply double *OUTPUT { double * sn, double * cn, double * dn, double * sgn };

%ignore gsl_sf_ellint_D_e;
%ignore gsl_sf_ellint_D;
%ignore gsl_sf_mathieu_a_e;
%ignore gsl_sf_mathieu_a;
%ignore gsl_sf_mathieu_b_e;
%ignore gsl_sf_mathieu_b;
%ignore gsl_sf_mathieu_ce_e;
%ignore gsl_sf_mathieu_ce;
%ignore gsl_sf_mathieu_se_e;
%ignore gsl_sf_mathieu_se;
%ignore gsl_sf_mathieu_Mc_e;
%ignore gsl_sf_mathieu_Mc;
%ignore gsl_sf_mathieu_Ms_e;
%ignore gsl_sf_mathieu_Ms;

// rename wrappers to original

%ignore gsl_sf_bessel_Jn_array;
%rename (gsl_sf_bessel_Jn_array) gsl_sf_bessel_Jn_array_wrapper;
array_wrapper* gsl_sf_bessel_Jn_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_Yn_array;
%rename (gsl_sf_bessel_Yn_array) gsl_sf_bessel_Yn_array_wrapper;
array_wrapper* gsl_sf_bessel_Yn_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_In_array;
%rename (gsl_sf_bessel_In_array) gsl_sf_bessel_In_array_wrapper;
array_wrapper* gsl_sf_bessel_In_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_In_scaled_array;
%rename (gsl_sf_bessel_In_scaled_array) gsl_sf_bessel_In_scaled_array_wrapper;
array_wrapper* gsl_sf_bessel_In_scaled_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_Kn_array;
%rename (gsl_sf_bessel_Kn_array) gsl_sf_bessel_Kn_array_wrapper;
array_wrapper* gsl_sf_bessel_Kn_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_Kn_scaled_array;
%rename (gsl_sf_bessel_Kn_scaled_array) gsl_sf_bessel_Kn_scaled_array_wrapper;
array_wrapper* gsl_sf_bessel_Kn_scaled_array_wrapper(int nmin, int nmax, double x);
%ignore gsl_sf_bessel_jl_array;
%rename (gsl_sf_bessel_jl_array) gsl_sf_bessel_jl_array_wrapper;
array_wrapper* gsl_sf_bessel_jl_array_wrapper(int lmax, double x);
%ignore gsl_sf_bessel_jl_steed_array;
%rename (gsl_sf_bessel_jl_steed_array) gsl_sf_bessel_jl_steed_array_wrapper;
array_wrapper* gsl_sf_bessel_jl_steed_array_wrapper(int lmax, double x);
%ignore gsl_sf_bessel_yl_array;
%rename (gsl_sf_bessel_yl_array) gsl_sf_bessel_yl_array_wrapper;
array_wrapper* gsl_sf_bessel_yl_array_wrapper(int lmax, double x);
%ignore gsl_sf_bessel_il_scaled_array;
%rename (gsl_sf_bessel_il_scaled_array) gsl_sf_bessel_il_scaled_array_wrapper;
array_wrapper* gsl_sf_bessel_il_scaled_array_wrapper(int lmax, double x);
%ignore gsl_sf_bessel_kl_scaled_array;
%rename (gsl_sf_bessel_kl_scaled_array) gsl_sf_bessel_kl_scaled_array_wrapper;

%ignore gsl_sf_legendre_Plm_array;
%ignore gsl_sf_legendre_Plm_deriv_array;
%ignore gsl_sf_legendre_array_size;
%ignore gsl_sf_legendre_sphPlm_array;
%ignore gsl_sf_legendre_sphPlm_deriv_array;

%{
    #include "gsl/gsl_types.h"
    #include "gsl/gsl_version.h"
    #include "gsl/gsl_mode.h"
    #include "gsl/gsl_sf.h"
    #include "gsl/gsl_sf_airy.h"
    #include "gsl/gsl_sf_bessel.h"
    #include "gsl/gsl_sf_clausen.h"
    #include "gsl/gsl_sf_coulomb.h"
    #include "gsl/gsl_sf_coupling.h"
    #include "gsl/gsl_sf_dawson.h"
    #include "gsl/gsl_sf_debye.h"
    #include "gsl/gsl_sf_dilog.h"
    #include "gsl/gsl_sf_elementary.h"
    #include "gsl/gsl_sf_ellint.h"
    #include "gsl/gsl_sf_elljac.h"
    #include "gsl/gsl_sf_erf.h"
    #include "gsl/gsl_sf_exp.h"
    #include "gsl/gsl_sf_expint.h"
    #include "gsl/gsl_sf_fermi_dirac.h"
    #include "gsl/gsl_sf_gamma.h"
    #include "gsl/gsl_sf_gegenbauer.h"
    #include "gsl/gsl_sf_hyperg.h"
    #include "gsl/gsl_sf_laguerre.h"
    #include "gsl/gsl_sf_lambert.h"
    #include "gsl/gsl_sf_legendre.h"
    #include "gsl/gsl_sf_log.h"
    #include "gsl/gsl_sf_mathieu.h"
    #include "gsl/gsl_sf_pow_int.h"
    #include "gsl/gsl_sf_psi.h"
    #include "gsl/gsl_sf_result.h"
    #include "gsl/gsl_sf_synchrotron.h"
    #include "gsl/gsl_sf_transport.h"
    #include "gsl/gsl_sf_trig.h"
    #include "gsl/gsl_sf_zeta.h"

    array_wrapper* gsl_sf_bessel_Jn_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_Jn_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_Jn_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_Yn_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_Yn_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_Yn_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_In_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_In_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_In_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_In_scaled_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_In_scaled_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_In_scaled_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_Kn_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_Kn_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_Kn_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_Kn_scaled_array_wrapper(int nmin, int nmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(nmax - nmin + 1, awDouble);
        ret = gsl_sf_bessel_Kn_scaled_array(nmin,nmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_Kn_scaled_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_jl_array_wrapper(int lmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(lmax + 1, awDouble);
        ret = gsl_sf_bessel_jl_array(lmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_jl_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_jl_steed_array_wrapper(int lmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(lmax + 1, awDouble);
        ret = gsl_sf_bessel_jl_steed_array(lmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_jl_steed_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_yl_array_wrapper(int lmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(lmax + 1, awDouble);
        ret = gsl_sf_bessel_yl_array(lmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_yl_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_il_scaled_array_wrapper(int lmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(lmax + 1, awDouble);
        ret = gsl_sf_bessel_il_scaled_array(lmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_il_scaled_array returned %s", gsl_strerror(ret));
        return wrapper;
    }
    array_wrapper* gsl_sf_bessel_kl_scaled_array_wrapper(int lmax, double x) {
        int ret;
        array_wrapper * wrapper = array_wrapper_alloc(lmax + 1, awDouble);
        ret = gsl_sf_bessel_kl_scaled_array(lmax,x, (double*)(wrapper->data));
        if (ret != GSL_SUCCESS)
           croak("Math::GSL::SF::gsl_sf_bessel_kl_scaled_array returned %s", gsl_strerror(ret));
        return wrapper;
    }

%}

%inline %{
#if defined GSL_MAJOR_VERSION && (GSL_MAJOR_VERSION < 2)
    /* TOTAL HACKERY TO GET THINGS TO COMPILE on 1.15 and 1.16 */
    typedef enum
    {
    GSL_SF_LEGENDRE_SCHMIDT,
    GSL_SF_LEGENDRE_SPHARM,
    GSL_SF_LEGENDRE_FULL,
    GSL_SF_LEGENDRE_NONE
    } gsl_sf_legendre_t;

#endif
%}

%include "gsl/gsl_types.h"
%include "gsl/gsl_mode.h"
%include "gsl/gsl_sf.h"
%include "gsl/gsl_sf_airy.h"
%include "gsl/gsl_sf_bessel.h"
%include "gsl/gsl_sf_clausen.h"
%include "gsl/gsl_sf_coulomb.h"
%include "gsl/gsl_sf_coupling.h"
%include "gsl/gsl_sf_dawson.h"
%include "gsl/gsl_sf_debye.h"
%include "gsl/gsl_sf_dilog.h"
%include "gsl/gsl_sf_elementary.h"
%include "gsl/gsl_sf_ellint.h"
%include "gsl/gsl_sf_elljac.h"
%include "gsl/gsl_sf_erf.h"
%include "gsl/gsl_sf_exp.h"
%include "gsl/gsl_sf_expint.h"
%include "gsl/gsl_sf_fermi_dirac.h"
%include "gsl/gsl_sf_gamma.h"
%include "gsl/gsl_sf_gegenbauer.h"
%include "gsl/gsl_sf_hyperg.h"
%include "gsl/gsl_sf_laguerre.h"
%include "gsl/gsl_sf_lambert.h"
%include "gsl/gsl_sf_legendre.h"
%include "gsl/gsl_sf_log.h"
%include "gsl/gsl_sf_mathieu.h"
%include "gsl/gsl_sf_pow_int.h"
%include "gsl/gsl_sf_psi.h"
%include "gsl/gsl_sf_result.h"
%include "gsl/gsl_sf_synchrotron.h"
%include "gsl/gsl_sf_transport.h"
%include "gsl/gsl_sf_trig.h"
%include "gsl/gsl_sf_zeta.h"

%include "../pod/SF.pod"