diff options
author | Arun Isaac | 2021-04-08 15:41:09 +0530 |
---|---|---|
committer | Arun Isaac | 2021-04-08 15:41:09 +0530 |
commit | 2eacc2841e34c926b9bb739c9800783b61e1d01a (patch) | |
tree | a046e30cd8b215ee8d30237ae959bcd632623bc0 | |
parent | 04fac42febd1e8cd594910cdc1143b8666ec14a3 (diff) | |
download | nsmc-2eacc2841e34c926b9bb739c9800783b61e1d01a.tar.gz nsmc-2eacc2841e34c926b9bb739c9800783b61e1d01a.tar.lz nsmc-2eacc2841e34c926b9bb739c9800783b61e1d01a.zip |
Wrap volume-importance.
* scm/nsmc/wrap.scm (volume-importance): New function.
-rw-r--r-- | scm/nsmc/wrap.scm | 13 |
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))))) |