aboutsummaryrefslogtreecommitdiff
path: root/scm
diff options
context:
space:
mode:
authorArun Isaac2021-02-26 16:07:16 +0530
committerArun Isaac2021-02-26 16:08:00 +0530
commit94d735868847bb61c16bfc33131100a74e04d30a (patch)
tree5baef41331ebd4427fafdcc22fdfa3085f289c7c /scm
parentca38a1520726cd7532407e9ca969cc102216d667 (diff)
downloadnsmc-94d735868847bb61c16bfc33131100a74e04d30a.tar.gz
nsmc-94d735868847bb61c16bfc33131100a74e04d30a.tar.lz
nsmc-94d735868847bb61c16bfc33131100a74e04d30a.zip
Wrap volume-window function.
* scm/extent-sampling/wrap.scm (volume-window): New function.
Diffstat (limited to 'scm')
-rw-r--r--scm/extent-sampling/wrap.scm10
1 files changed, 10 insertions, 0 deletions
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