summaryrefslogtreecommitdiff
path: root/lib/Numeric/GSL/gsl-aux.c
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2013-08-20 08:46:44 -0700
committerAlberto Ruiz <aruiz@um.es>2013-08-20 08:46:44 -0700
commit2cf10b2de9cc3ad2d217e9d41bd3140362d5c13f (patch)
treee78f203715c7f06c37bbd62e9a4b4ab6aa69120c /lib/Numeric/GSL/gsl-aux.c
parent1c5b4916d527115780502e6f2923f99b7de5c0c8 (diff)
parent1661785e53574a501c7b40d10fabe808f49dd241 (diff)
Merge pull request #50 from peddie/master
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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Numeric/GSL/gsl-aux.c b/lib/Numeric/GSL/gsl-aux.c
index 58bccb3..24d82c4 100644
--- a/lib/Numeric/GSL/gsl-aux.c
+++ b/lib/Numeric/GSL/gsl-aux.c
@@ -803,6 +803,19 @@ int integrate_qagil(double f(double,void*), double b, double prec, int w,
803 OK 803 OK
804} 804}
805 805
806int integrate_cquad(double f(double,void*), double a, double b, double prec,
807 int w, double *result, double* error, int *neval) {
808 DEBUGMSG("integrate_cquad");
809 gsl_integration_cquad_workspace * wk = gsl_integration_cquad_workspace_alloc (w);
810 gsl_function F;
811 F.function = f;
812 F.params = NULL;
813 int res = gsl_integration_cquad (&F, a, b, 0, prec, wk, result, error, neval);
814 CHECK(res,res);
815 gsl_integration_cquad_workspace_free (wk);
816 OK
817}
818
806 819
807int polySolve(KRVEC(a), CVEC(z)) { 820int polySolve(KRVEC(a), CVEC(z)) {
808 DEBUGMSG("polySolve"); 821 DEBUGMSG("polySolve");