diff options
author | Arun Isaac | 2021-02-26 16:03:47 +0530 |
---|---|---|
committer | Arun Isaac | 2021-02-26 16:03:47 +0530 |
commit | ca38a1520726cd7532407e9ca969cc102216d667 (patch) | |
tree | 6ec4959fc20621be4e85b18c6265518df0de2c61 /src | |
parent | 6614ecbb65b71a7d9745a510189a05ff6b69f770 (diff) | |
download | nsmc-ca38a1520726cd7532407e9ca969cc102216d667.tar.gz nsmc-ca38a1520726cd7532407e9ca969cc102216d667.tar.lz nsmc-ca38a1520726cd7532407e9ca969cc102216d667.zip |
Remove unused neval variable.
* src/extent-sampling.sc (integral-per-direction): Remove neval from
function arguments.
(integral): Adjust integral-per-direction function call.
Diffstat (limited to 'src')
-rw-r--r-- | src/extent-sampling.sc | 15 |
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)))) |