aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scm/nsmc/wrap.scm34
1 files changed, 15 insertions, 19 deletions
diff --git a/scm/nsmc/wrap.scm b/scm/nsmc/wrap.scm
index 9226483..14d328f 100644
--- a/scm/nsmc/wrap.scm
+++ b/scm/nsmc/wrap.scm
@@ -185,7 +185,7 @@
;; Running statistics
-(define rstat-alloc
+(define-public rstat-alloc
(make-gsl-alloc "gsl_rstat_alloc" (list) "gsl_rstat_free"))
(define-public rstat-n
@@ -371,24 +371,20 @@
%null-pointer))
(integrand integrand)))
-(define-public (volume extent-oracle true-volume dimension rtol)
- (let ((stats (rstat-alloc)))
- ((pointer->procedure void
- (dynamic-func "volume" lib-nsmc)
- (list '* double '* unsigned-int double '*))
- (maybe-procedure->extent-oracle extent-oracle)
- true-volume %gsl-random-state dimension rtol stats)
- stats))
-
-(define-public (integral integrand extent-oracle true-integral dimension rtol)
- (let ((stats (rstat-alloc)))
- ((pointer->procedure void
- (dynamic-func "integral" lib-nsmc)
- (list '* '* double '* unsigned-int double '*))
- (maybe-procedure->integrand integrand)
- (maybe-procedure->extent-oracle extent-oracle)
- true-integral %gsl-random-state dimension rtol stats)
- stats))
+(define-public (volume extent-oracle true-volume dimension rtol stats)
+ ((pointer->procedure void
+ (dynamic-func "volume" lib-nsmc)
+ (list '* double '* unsigned-int double '*))
+ (maybe-procedure->extent-oracle extent-oracle)
+ true-volume %gsl-random-state dimension rtol stats))
+
+(define-public (integral integrand extent-oracle true-integral dimension rtol stats)
+ ((pointer->procedure void
+ (dynamic-func "integral" lib-nsmc)
+ (list '* '* double '* unsigned-int double '*))
+ (maybe-procedure->integrand integrand)
+ (maybe-procedure->extent-oracle extent-oracle)
+ true-integral %gsl-random-state dimension rtol stats))
(define-public (volume-importance extent-oracle mean samples-per-cone
solid-angle-factor solid-angle-threshold-exponent-factor)