summaryrefslogtreecommitdiff
path: root/space_wolff.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'space_wolff.hpp')
-rw-r--r--space_wolff.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/space_wolff.hpp b/space_wolff.hpp
index b542fbb..615fb93 100644
--- a/space_wolff.hpp
+++ b/space_wolff.hpp
@@ -364,17 +364,14 @@ public:
unsigned nDepth;
std::function<double(const Spin<U, D, S>&, const Spin<U, D, S>&)> Z;
std::function<double(const Spin<U, D, S>&)> B;
- std::function<R(const Model<U, D, R, S>&, randutils::mt19937_rng&)> g;
randutils::mt19937_rng rng;
- measurement<U, D, R, S>& A;
Model(U L, std::function<double(const Spin<U, D, S>&, const Spin<U, D, S>&)> Z,
- std::function<double(const Spin<U, D, S>&)> B, std::function<R(const Model<U, D, R, S>&, randutils::mt19937_rng&)> g, unsigned dDepth, unsigned nDepth,
- measurement<U, D, R, S>& A)
- : L(L), s0(L), dict(L, dDepth), Z(Z), B(B), g(g), dDepth(dDepth), nDepth(nDepth), rng(), A(A) {}
+ std::function<double(const Spin<U, D, S>&)> B, unsigned dDepth, unsigned nDepth)
+ : L(L), s0(L), dict(L, dDepth), Z(Z), B(B), dDepth(dDepth), nDepth(nDepth), rng() {}
- void step(double T, unsigned ind, Euclidean<U, D> r) {
+ void step(double T, unsigned ind, Euclidean<U, D> r, measurement<U, D, R, S>& A) {
unsigned cluster_size = 0;
std::queue<Spin<U, D, S>*> queue;
@@ -438,14 +435,18 @@ public:
}
}
- void wolff(double T, unsigned N) {
+ void resize(double T, double P) {
+ }
+
+ void wolff(double T, std::function<R(const Model<U, D, R, S>&, randutils::mt19937_rng&)> g,
+ measurement<U, D, R, S>& A, unsigned N) {
for (unsigned i = 0; i < N; i++) {
R r = g(*this, rng);
unsigned ind = rng.uniform((unsigned)0, (unsigned)(s.size() - 1));
A.pre_cluster(*this, ind, r);
- this->step(T, ind, r);
+ this->step(T, ind, r, A);
A.post_cluster(*this);
}