diff options
author | Arun Isaac | 2021-02-11 15:31:16 +0530 |
---|---|---|
committer | Arun Isaac | 2021-02-11 15:31:16 +0530 |
commit | 6ebe3d0004ac8b19cf4a6fcfc3b2fba16bdc6b97 (patch) | |
tree | 9e4f3ad3ac7709634c9809b10e9b702f8c9c75bb /src | |
parent | 10d4a342fd02f79bdd848a87316c6f7dffc24019 (diff) | |
download | nsmc-6ebe3d0004ac8b19cf4a6fcfc3b2fba16bdc6b97.tar.gz nsmc-6ebe3d0004ac8b19cf4a6fcfc3b2fba16bdc6b97.tar.lz nsmc-6ebe3d0004ac8b19cf4a6fcfc3b2fba16bdc6b97.zip |
Pass extent-oracle-t as pointer.
* include/extent-sampling.h (volume, volume_window, integral,
volume_cone, volume_experiment): Pass extent_oracle_t as pointer.
* src/extent-sampling.sc: Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/extent-sampling.sc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/extent-sampling.sc b/src/extent-sampling.sc index b54c44b..c91c46c 100644 --- a/src/extent-sampling.sc +++ b/src/extent-sampling.sc @@ -26,13 +26,13 @@ body ...)) (sc-define-syntax (invoke-extent-oracle extent-oracle r x) - ((struct-get extent-oracle oracle) r x (struct-get extent-oracle params))) + ((: extent-oracle oracle) r x (: extent-oracle params))) (pre-define CONFIDENCE-INTERVAL-FACTOR 1.96) (pre-let* (VOLUME-MINIMUM-SAMPLES 100) (define (volume extent-oracle true-volume r dimension rtol stats) - (double extent-oracle-t double (const gsl-rng*) (unsigned int) double gsl-rstat-workspace*) + (double extent-oracle-t* double (const gsl-rng*) (unsigned int) double gsl-rstat-workspace*) (declare volume double) (let* ((vn double (ln-volume-of-ball dimension))) (with-vector x dimension @@ -49,7 +49,7 @@ (return volume))) (define (volume-window extent-oracle true-volume r dimension rtol number-of-samples) - (double extent-oracle-t double (const gsl-rng*) (unsigned int) double (unsigned int*)) + (double extent-oracle-t* double (const gsl-rng*) (unsigned int) double (unsigned int*)) (declare volume double) (let* ((vn double (ln-volume-of-ball dimension)) ;; This is the window length used in Volume.m of @@ -97,7 +97,7 @@ (pre-let* (INTEGRAL-MINIMUM-SAMPLES 100) (define (integral integrand extent-oracle true-integral r dimension rtol stats) - (double integrand-t extent-oracle-t double (const gsl-rng*) (unsigned int) double gsl-rstat-workspace*) + (double integrand-t extent-oracle-t* double (const gsl-rng*) (unsigned int) double gsl-rstat-workspace*) (declare integral double error double) (with-vector x dimension @@ -119,7 +119,7 @@ (return integral))) (define (volume-cone extent-oracle r mean omega-min omega-max number-of-samples variance) - (double extent-oracle-t (const gsl-rng*) (const gsl-vector*) double double (unsigned int) double*) + (double extent-oracle-t* (const gsl-rng*) (const gsl-vector*) double double (unsigned int) double*) (declare volume double) (let* ((dimension (unsigned int) (: mean size)) (vn double (ln-volume-of-ball dimension)) @@ -139,7 +139,7 @@ (define (volume-experiment extent-oracle r mean samples-per-cone solid-angle-factor solid-angle-threshold-exponent-factor number-of-samples) - (double extent-oracle-t (const gsl-rng*) (const gsl-vector*) + (double extent-oracle-t* (const gsl-rng*) (const gsl-vector*) (unsigned int) double double (unsigned int*)) (define volume double 0 |