aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scm/nsmc/wrap.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/scm/nsmc/wrap.scm b/scm/nsmc/wrap.scm
index ae86413..33c1bee 100644
--- a/scm/nsmc/wrap.scm
+++ b/scm/nsmc/wrap.scm
@@ -388,3 +388,16 @@
(maybe-procedure->extent-oracle extent-oracle)
true-integral %gsl-random-state dimension rtol stats)
(rstat-n stats)))
+
+(define-public (volume-importance extent-oracle mean samples-per-cone
+ solid-angle-factor solid-angle-threshold-exponent-factor)
+ (let ((samples (make-c-struct (list unsigned-int) (list 0))))
+ (values
+ ((pointer->procedure double
+ (dynamic-func "volume_importance" lib-nsmc)
+ (list '* '* '* unsigned-int double double '*))
+ (maybe-procedure->extent-oracle extent-oracle)
+ %gsl-random-state mean samples-per-cone solid-angle-factor
+ solid-angle-threshold-exponent-factor samples)
+ (match (parse-c-struct samples (list unsigned-int))
+ ((samples) samples)))))