about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorArun Isaac2021-02-23 16:29:44 +0530
committerArun Isaac2021-02-23 16:29:44 +0530
commitb712756e74e3e3c101064bbefc1d062b73d11443 (patch)
tree92d8aca35291af75195a819b271515a9643a1f20 /src
parent25343d3723ae70690f056b0a501f5941892fbf93 (diff)
downloadnsmc-b712756e74e3e3c101064bbefc1d062b73d11443.tar.gz
nsmc-b712756e74e3e3c101064bbefc1d062b73d11443.tar.lz
nsmc-b712756e74e3e3c101064bbefc1d062b73d11443.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/utils.sc4
1 files changed, 0 insertions, 4 deletions
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]."