summaryrefslogtreecommitdiff
path: root/hadamard_mcmc.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-17 15:02:09 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-12-17 15:02:09 -0500
commitb80e90d1ed702877f905875be3e416ca599a62a3 (patch)
tree53fca080434ddc1b3d3795b121eea35f4f21a00c /hadamard_mcmc.hpp
parent342d83d6f24d5b063864f883ec05e7c9fff1301c (diff)
downloadcode-b80e90d1ed702877f905875be3e416ca599a62a3.tar.gz
code-b80e90d1ed702877f905875be3e416ca599a62a3.tar.bz2
code-b80e90d1ed702877f905875be3e416ca599a62a3.zip
partial implementation of dynamic pt
Diffstat (limited to 'hadamard_mcmc.hpp')
-rw-r--r--hadamard_mcmc.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/hadamard_mcmc.hpp b/hadamard_mcmc.hpp
index 9f0d8c0..c9fa2da 100644
--- a/hadamard_mcmc.hpp
+++ b/hadamard_mcmc.hpp
@@ -140,6 +140,12 @@ public:
virtual void after_sweep(double, double, const Orthogonal&){};
};
+typedef enum {
+ none,
+ up,
+ down
+} color;
+
class MCMC {
private:
randutils::mt19937_rng rng;
@@ -150,10 +156,14 @@ public:
const double β;
double E;
Orthogonal M;
+ unsigned tag;
+ color c;
- MCMC(unsigned n, double β0, Measurement& A) : A(A), M(n), β(β0) {
+ MCMC(unsigned n, double β0, Measurement& A, unsigned tag = 0) : A(A), M(n), β(β0) {
θ0 = M_PI;
E = M.energy();
+ tag = tag;
+ c = none;
}
bool step(Givens& g, bool dry = false) {