aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArun Isaac2021-05-07 17:00:32 +0530
committerArun Isaac2021-05-07 17:06:27 +0530
commitb8fbf7aca272022c6e1e298636da789f31cd6fc4 (patch)
tree171cc7e0d78ba88797ac8b6fc3c86afa5cbd6103 /src
parent80d15411b74f3eca6969d7276152500dd8ece463 (diff)
downloadnsmc-b8fbf7aca272022c6e1e298636da789f31cd6fc4.tar.gz
nsmc-b8fbf7aca272022c6e1e298636da789f31cd6fc4.tar.lz
nsmc-b8fbf7aca272022c6e1e298636da789f31cd6fc4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/extent-sampling.sc6
1 files 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))))