diff options
Diffstat (limited to 'lib/GSL/gsl-aux.h')
-rw-r--r-- | lib/GSL/gsl-aux.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/GSL/gsl-aux.h b/lib/GSL/gsl-aux.h new file mode 100644 index 0000000..89bd75e --- /dev/null +++ b/lib/GSL/gsl-aux.h | |||
@@ -0,0 +1,66 @@ | |||
1 | #include <gsl/gsl_complex.h> | ||
2 | |||
3 | #define RVEC(A) int A##n, double*A##p | ||
4 | #define RMAT(A) int A##r, int A##c, double* A##p | ||
5 | #define KRVEC(A) int A##n, const double*A##p | ||
6 | #define KRMAT(A) int A##r, int A##c, const double* A##p | ||
7 | |||
8 | #define CVEC(A) int A##n, gsl_complex*A##p | ||
9 | #define CMAT(A) int A##r, int A##c, gsl_complex* A##p | ||
10 | #define KCVEC(A) int A##n, const gsl_complex*A##p | ||
11 | #define KCMAT(A) int A##r, int A##c, const gsl_complex* A##p | ||
12 | |||
13 | int toScalarR(int code, KRVEC(x), RVEC(r)); | ||
14 | /* norm2, absdif, maximum, posmax, etc. */ | ||
15 | |||
16 | int mapR(int code, KRVEC(x), RVEC(r)); | ||
17 | int mapC(int code, KCVEC(x), CVEC(r)); | ||
18 | /* sin cos tan etc. */ | ||
19 | |||
20 | int mapValR(int code, double*, KRVEC(x), RVEC(r)); | ||
21 | int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r)); | ||
22 | |||
23 | int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)); | ||
24 | int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)); | ||
25 | |||
26 | |||
27 | int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)); | ||
28 | int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)); | ||
29 | int luRaux(KRMAT(a),RVEC(b)); | ||
30 | int luCaux(KCMAT(a),CVEC(b)); | ||
31 | |||
32 | int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v)); | ||
33 | |||
34 | int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)); | ||
35 | int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)); | ||
36 | |||
37 | int QR(KRMAT(x),RMAT(q),RMAT(r)); | ||
38 | |||
39 | int chol(KRMAT(x),RMAT(l)); | ||
40 | |||
41 | int fft(int code, KCVEC(a), CVEC(b)); | ||
42 | |||
43 | int integrate_qng(double f(double, void*), double a, double b, double prec, | ||
44 | double *result, double*error); | ||
45 | |||
46 | int integrate_qags(double f(double,void*), double a, double b, double prec, int w, | ||
47 | double *result, double* error); | ||
48 | |||
49 | int polySolve(KRVEC(a), CVEC(z)); | ||
50 | |||
51 | int matrix_fscanf(char*filename, RMAT(a)); | ||
52 | |||
53 | int minimize(double f(int, double*), double tolsize, int maxit, | ||
54 | KRVEC(xi), KRVEC(sz), RMAT(sol)); | ||
55 | |||
56 | int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), | ||
57 | double initstep, double minimpar, double tolgrad, int maxit, | ||
58 | KRVEC(xi), RMAT(sol)); | ||
59 | |||
60 | int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr); | ||
61 | |||
62 | double gsl_sf_erf(double); | ||
63 | double gsl_sf_erf_Z(double); | ||
64 | |||
65 | int gsl_sf_bessel_J0_e(double, double*); // hmmm... | ||
66 | int gsl_sf_exp_e10_e(double, double*); // HMMMMM... | ||