diff options
author | Matthew Peddie <peddie@alum.mit.edu> | 2013-08-19 01:26:08 -0700 |
---|---|---|
committer | Matthew Peddie <peddie@alum.mit.edu> | 2013-08-19 01:26:08 -0700 |
commit | 1661785e53574a501c7b40d10fabe808f49dd241 (patch) | |
tree | 3346e16f8f1df23b2f424bad8d6f1871c5b10e53 /lib/Numeric/GSL/gsl-aux.c | |
parent | 374194ee454622e66c931dce8f315c68167c7ac9 (diff) |
Add bindings for gsl_integrate_cquad doubly-adaptive quadrature for difficult integrands.
Diffstat (limited to 'lib/Numeric/GSL/gsl-aux.c')
-rw-r--r-- | lib/Numeric/GSL/gsl-aux.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c index e727c91..756edf1 100644 --- a/lib/Numeric/GSL/gsl-aux.c +++ b/lib/Numeric/GSL/gsl-aux.c | |||
@@ -802,6 +802,19 @@ int integrate_qagil(double f(double,void*), double b, double prec, int w, | |||
802 | OK | 802 | OK |
803 | } | 803 | } |
804 | 804 | ||
805 | int integrate_cquad(double f(double,void*), double a, double b, double prec, | ||
806 | int w, double *result, double* error, int *neval) { | ||
807 | DEBUGMSG("integrate_cquad"); | ||
808 | gsl_integration_cquad_workspace * wk = gsl_integration_cquad_workspace_alloc (w); | ||
809 | gsl_function F; | ||
810 | F.function = f; | ||
811 | F.params = NULL; | ||
812 | int res = gsl_integration_cquad (&F, a, b, 0, prec, wk, result, error, neval); | ||
813 | CHECK(res,res); | ||
814 | gsl_integration_cquad_workspace_free (wk); | ||
815 | OK | ||
816 | } | ||
817 | |||
805 | 818 | ||
806 | int polySolve(KRVEC(a), CVEC(z)) { | 819 | int polySolve(KRVEC(a), CVEC(z)) { |
807 | DEBUGMSG("polySolve"); | 820 | DEBUGMSG("polySolve"); |