aboutsummaryrefslogtreecommitdiff
path: root/src/extent-sampling.sc
diff options
context:
space:
mode:
Diffstat (limited to 'src/extent-sampling.sc')
-rw-r--r--src/extent-sampling.sc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/extent-sampling.sc b/src/extent-sampling.sc
index 69ea0a7..2110243 100644
--- a/src/extent-sampling.sc
+++ b/src/extent-sampling.sc
@@ -75,10 +75,9 @@
((: integrand integrand) r x (: integrand params)))
(pre-let* (INTEGRATION-INTERVALS 1000)
- (define (integral-per-direction integrand direction r n radius rtol neval)
- (double integrand-t* (const gsl-vector*) (const gsl-rng*) (unsigned int) double double int*)
+ (define (integral-per-direction integrand direction r n radius rtol)
+ (double integrand-t* (const gsl-vector*) (const gsl-rng*) (unsigned int) double double)
(define (f r params) (double double void*)
- (set+ (pointer-get neval) 1)
(return (* (gsl-pow-uint r (- n 1))
(invoke-integrand integrand r direction))))
(declare gsl-f (struct-variable gsl-function (function (address-of f)))
@@ -107,12 +106,10 @@
(do-while (or (> error rtol)
(> (rerror integral true-integral) rtol)
(< (gsl-rstat-n stats) INTEGRAL-MINIMUM-SAMPLES))
- ;; TODO: If this neval is not used anywhere, remove it.
- (let* ((neval int 0))
- (random-direction-vector r x)
- (gsl-rstat-add (integral-per-direction integrand x r dimension
- (invoke-extent-oracle extent-oracle r x) rtol (address-of neval))
- stats))
+ (random-direction-vector r x)
+ (gsl-rstat-add (integral-per-direction integrand x r dimension
+ (invoke-extent-oracle extent-oracle r x) rtol)
+ stats)
(set integral (gsl-rstat-mean stats))
(set error (/ (* CONFIDENCE-INTERVAL-FACTOR (gsl-rstat-sd-mean stats))
integral))))