aboutsummaryrefslogtreecommitdiff
path: root/src/extent-sampling.sc
diff options
context:
space:
mode:
Diffstat (limited to 'src/extent-sampling.sc')
-rw-r--r--src/extent-sampling.sc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/extent-sampling.sc b/src/extent-sampling.sc
index d46f31d..b74051f 100644
--- a/src/extent-sampling.sc
+++ b/src/extent-sampling.sc
@@ -52,6 +52,28 @@
(else
(set accurate-estimates 0))))))))
+;; (pre-let* (WINDOW-LENGTH 1000 COVARIANCE-SAMPLES 1000 HARDCODED-ECCENTRICITY 2)
+;; (define (volume-whitening extent-oracle true-volume r dimension rtol stats)
+;; (void (const extent-oracle-t*) double (const gsl-rng*) (unsigned int) double gsl-rstat-workspace*)
+;; (define accurate-estimates int 0)
+;; (let* ((vn double (ln-volume-of-ball dimension)))
+;; (with-square-matrix transform dimension
+;; (gsl-matrix-set-identity transform)
+;; ;; TODO: Replace hardcoded eccentricity.
+;; (gsl-matrix-set transform 0 0 HARDCODED-ECCENTRICITY)
+;; (with-vector x dimension
+;; (with-vector y dimension
+;; (do-while (< accurate-estimates WINDOW-LENGTH)
+;; (random-direction-vector r x)
+;; (cblas-dgemv CblasRowMajor CblasNoTrans dimension dimension 1 transform dimension x 1 0 y 1)
+;; (gsl-rstat-add (exp (+ vn (* dimension (log (gsl-blas-dnrm2 y)))))
+;; stats)
+;; (cond
+;; ((rtol? (gsl-rstat-mean stats) true-volume rtol)
+;; (set+ accurate-estimates 1))
+;; (else
+;; (set accurate-estimates 0))))))))))
+
(sc-define-syntax (invoke-integrand integrand r x)
((: integrand integrand) r x (: integrand params)))