From b712756e74e3e3c101064bbefc1d062b73d11443 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 23 Feb 2021 16:29:44 +0530 Subject: Implement the lower incomplete gamma function as a scheme wrapper. With this change, the wrapper around the gsl lower incomplete gamma function is directly in scheme. Earlier, there was one layer of wrapping in C which needed to be wrapped again in scheme. * include/utils.h (lower_incomplete_gamma): Delete function. * src/utils.sc (lower-incomplete-gamma): Delete function. * scm/extent-sampling/wrap.scm (lower-incomplete-gamma): New function. --- src/utils.sc | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src') diff --git a/src/utils.sc b/src/utils.sc index a481109..3d96b40 100644 --- a/src/utils.sc +++ b/src/utils.sc @@ -39,10 +39,6 @@ sphere, etc." 2 corresponds to a circle, 3 corresponds to a sphere, etc." (return (* dimension (volume-of-ball dimension)))) -(define (lower-incomplete-gamma s x) (double double double) - (return (* (gsl-sf-gamma s) - (gsl-sf-gamma-inc-P s x)))) - (define (angle-between-vectors x y) (double (const gsl-vector*) (const gsl-vector*)) "Return the angle between vectors X and Y. The returned value is in the range [0,pi]." -- cgit v1.2.3