diff options
author | Arun Isaac | 2022-01-08 12:44:52 +0530 |
---|---|---|
committer | Arun Isaac | 2022-01-08 13:02:05 +0530 |
commit | 81b49377edf2d5b08dca4b5ff3132499861244ea (patch) | |
tree | 9732533cbd870b0aa11a14c37b468e6ed1bfce45 /src/extent-sampling.sc | |
parent | 0ef42dfb41960ffa49aafc04fc7c9bfd49d13857 (diff) | |
download | nsmc-81b49377edf2d5b08dca4b5ff3132499861244ea.tar.gz nsmc-81b49377edf2d5b08dca4b5ff3132499861244ea.tar.lz nsmc-81b49377edf2d5b08dca4b5ff3132499861244ea.zip |
Bunch of unfinished experimentsunfinished-experiments
These experiments were in progress towards the end, and never properly
finished. I leave the code here in case it turns out to be useful.
Diffstat (limited to 'src/extent-sampling.sc')
-rw-r--r-- | src/extent-sampling.sc | 22 |
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))) |