From b8fbf7aca272022c6e1e298636da789f31cd6fc4 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 7 May 2021 17:00:32 +0530 Subject: Do not pass rng to integral-per-direction. integral-per-direction should be purely deterministic. * src/extent-sampling.sc (integral-per-direction): Do not accept rng as argument. (integral): Do not pass rng to integral-per-direction. --- src/extent-sampling.sc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extent-sampling.sc b/src/extent-sampling.sc index fb502a0..dd9427c 100644 --- a/src/extent-sampling.sc +++ b/src/extent-sampling.sc @@ -52,8 +52,8 @@ ((: integrand integrand) r x (: integrand params))) (pre-let* (INTEGRATION-INTERVALS 1000) - (define (integral-per-direction integrand direction r n radius rtol) - (double integrand-t* (const gsl-vector*) (const gsl-rng*) (unsigned int) double double) + (define (integral-per-direction integrand direction n radius rtol) + (double integrand-t* (const gsl-vector*) (unsigned int) double double) (define (f r params) (double double void*) (return (* (gsl-pow-uint r (- n 1)) (invoke-integrand integrand r direction)))) @@ -80,7 +80,7 @@ (do-while (> (rerror (gsl-rstat-mean stats) true-integral) rtol) (random-direction-vector r x) - (gsl-rstat-add (integral-per-direction integrand x r dimension + (gsl-rstat-add (integral-per-direction integrand x dimension (invoke-extent-oracle extent-oracle r x) rtol) stats)))) -- cgit v1.2.3