summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-12 00:49:20 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-12 00:49:20 -0400
commitdc302fc0c958713c9f5e8b593690bf5aaa94e495 (patch)
tree139d88a529e507caa8ab646f5362c18da277dcd7
parentff8454900b142d24eea96abb7c671feae312e07c (diff)
downloadcode-dc302fc0c958713c9f5e8b593690bf5aaa94e495.tar.gz
code-dc302fc0c958713c9f5e8b593690bf5aaa94e495.tar.bz2
code-dc302fc0c958713c9f5e8b593690bf5aaa94e495.zip
Step angles drawn from Gaussian rather than uniform distribution.
-rw-r--r--hadamard_mcmc.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hadamard_mcmc.hpp b/hadamard_mcmc.hpp
index 41d7a48..fb0bc86 100644
--- a/hadamard_mcmc.hpp
+++ b/hadamard_mcmc.hpp
@@ -84,11 +84,11 @@ public:
transpose = t;
axis_1 = a1;
axis_2 = a2;
- Δθ = rng.uniform(-θ0, θ0);
+ Δθ = rng.variate<double>(0.0, θ0);
}
Givens(Orthogonal& m, double θ0, Rng& rng) : m(m) {
- Δθ = rng.uniform(-θ0, θ0);
+ Δθ = rng.variate<double>(0.0, θ0);
unsigned axis1axis2 = rng.uniform((unsigned)0, m.size() * (m.size() - 1) - 1);
axis_1 = axis1axis2 / (m.size() - 1);