From 94d735868847bb61c16bfc33131100a74e04d30a Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 26 Feb 2021 16:07:16 +0530 Subject: Wrap volume-window function. * scm/extent-sampling/wrap.scm (volume-window): New function. --- scm/extent-sampling/wrap.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scm/extent-sampling/wrap.scm b/scm/extent-sampling/wrap.scm index 439a57d..306caa4 100644 --- a/scm/extent-sampling/wrap.scm +++ b/scm/extent-sampling/wrap.scm @@ -344,6 +344,16 @@ true-volume %gsl-random-state dimension rtol stats) (rstat-n stats))) +(define-public (volume-window extent-oracle true-volume dimension rtol) + (let ((samples (make-c-struct (list unsigned-int) (list 0)))) + ((pointer->procedure double + (dynamic-func "volume_window" lib-extentsampling) + (list '* double '* unsigned-int double '*)) + (maybe-procedure->extent-oracle extent-oracle) + true-volume %gsl-random-state dimension rtol samples) + (match (parse-c-struct samples (list unsigned-int)) + ((samples) samples)))) + (define-public (integral integrand extent-oracle true-integral dimension rtol) (let ((stats (rstat-alloc))) ((pointer->procedure double -- cgit v1.2.3