diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-10-01 15:04:16 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-10-01 15:04:16 +0000 |
commit | c99b8fd6e3f8a2fb365ec12baf838f864b118ece (patch) | |
tree | 11b5b8515861fe88d547253ae10c2182d5fadaf2 /lib/Numeric/GSL/gsl-aux.h | |
parent | 768f08d4134a066d773d56a9c03ae688e3850352 (diff) |
LinearAlgebra and GSL moved to Numeric
Diffstat (limited to 'lib/Numeric/GSL/gsl-aux.h')
-rw-r--r-- | lib/Numeric/GSL/gsl-aux.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/lib/Numeric/GSL/gsl-aux.h b/lib/Numeric/GSL/gsl-aux.h new file mode 100644 index 0000000..3ccac25 --- /dev/null +++ b/lib/Numeric/GSL/gsl-aux.h | |||
@@ -0,0 +1,62 @@ | |||
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 | void no_abort_on_error(); | ||
14 | |||
15 | int toScalarR(int code, KRVEC(x), RVEC(r)); | ||
16 | /* norm2, absdif, maximum, posmax, etc. */ | ||
17 | |||
18 | int mapR(int code, KRVEC(x), RVEC(r)); | ||
19 | int mapC(int code, KCVEC(x), CVEC(r)); | ||
20 | /* sin cos tan etc. */ | ||
21 | |||
22 | int mapValR(int code, double*, KRVEC(x), RVEC(r)); | ||
23 | int mapValC(int code, gsl_complex*, KCVEC(x), CVEC(r)); | ||
24 | |||
25 | int zipR(int code, KRVEC(a), KRVEC(b), RVEC(r)); | ||
26 | int zipC(int code, KCVEC(a), KCVEC(b), CVEC(r)); | ||
27 | |||
28 | |||
29 | int luSolveR(KRMAT(a),KRMAT(b),RMAT(r)); | ||
30 | int luSolveC(KCMAT(a),KCMAT(b),CMAT(r)); | ||
31 | int luRaux(KRMAT(a),RVEC(b)); | ||
32 | int luCaux(KCMAT(a),CVEC(b)); | ||
33 | |||
34 | int svd(KRMAT(x),RMAT(u), RVEC(s),RMAT(v)); | ||
35 | |||
36 | int eigensystemR(KRMAT(x),RVEC(l),RMAT(v)); | ||
37 | int eigensystemC(KCMAT(x),RVEC(l),CMAT(v)); | ||
38 | |||
39 | int QR(KRMAT(x),RMAT(q),RMAT(r)); | ||
40 | |||
41 | int cholR(KRMAT(x),RMAT(l)); | ||
42 | |||
43 | int cholC(KCMAT(x),CMAT(l)); | ||
44 | |||
45 | int fft(int code, KCVEC(a), CVEC(b)); | ||
46 | |||
47 | int integrate_qng(double f(double, void*), double a, double b, double prec, | ||
48 | double *result, double*error); | ||
49 | |||
50 | int integrate_qags(double f(double,void*), double a, double b, double prec, int w, | ||
51 | double *result, double* error); | ||
52 | |||
53 | int polySolve(KRVEC(a), CVEC(z)); | ||
54 | |||
55 | int minimize(double f(int, double*), double tolsize, int maxit, | ||
56 | KRVEC(xi), KRVEC(sz), RMAT(sol)); | ||
57 | |||
58 | int minimizeWithDeriv(double f(int, double*), void df(int, double*, double*), | ||
59 | double initstep, double minimpar, double tolgrad, int maxit, | ||
60 | KRVEC(xi), RMAT(sol)); | ||
61 | |||
62 | int deriv(int code, double f(double, void*), double x, double h, double * result, double * abserr); | ||