From 6ebe3d0004ac8b19cf4a6fcfc3b2fba16bdc6b97 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 11 Feb 2021 15:31:16 +0530 Subject: 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. --- src/extent-sampling.sc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3