summaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/wolff.hpp4
-rw-r--r--lib/include/wolff/cluster.hpp8
-rw-r--r--lib/include/wolff/system.hpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/include/wolff.hpp b/lib/include/wolff.hpp
index 7ad608f..7e909c8 100644
--- a/lib/include/wolff.hpp
+++ b/lib/include/wolff.hpp
@@ -10,7 +10,7 @@ namespace wolff{
template <class R_t, class X_t>
void system<R_t, X_t>::run_wolff(N_t N,
std::function <R_t(std::mt19937&, const system<R_t, X_t>&, v_t)> r_gen,
- measurement<R_t, X_t>& A, std::mt19937& rng, double x) {
+ measurement<R_t, X_t>& A, std::mt19937& rng) {
std::uniform_int_distribution<v_t> dist(0, nv - 1);
@@ -20,7 +20,7 @@ void system<R_t, X_t>::run_wolff(N_t N,
A.pre_cluster(n, N, *this, i0, r);
- this->flip_cluster(i0, r, rng, A, x);
+ this->flip_cluster(i0, r, rng, A);
A.post_cluster(n, N, *this);
}
diff --git a/lib/include/wolff/cluster.hpp b/lib/include/wolff/cluster.hpp
index 34d256a..b66f367 100644
--- a/lib/include/wolff/cluster.hpp
+++ b/lib/include/wolff/cluster.hpp
@@ -13,7 +13,7 @@ namespace wolff {
template <class R_t, class X_t>
void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r,
- std::mt19937& rng, measurement<R_t, X_t>& A, double x) {
+ std::mt19937& rng, measurement<R_t, X_t>& A) {
std::uniform_real_distribution<double> dist(0.0, 1.0);
std::queue<v_t> queue;
@@ -69,7 +69,7 @@ void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r,
#endif
#ifdef WOLFF_FINITE_STATES
- p = 1.0 - x + x * finite_states_Bp[finite_states_enum(s0s_old)]
+ p = finite_states_Bp[finite_states_enum(s0s_old)]
[finite_states_enum(s0s_new)];
#endif
@@ -85,7 +85,7 @@ void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r,
#endif
#ifdef WOLFF_FINITE_STATES
- p = 1.0 - x + x * finite_states_Zp[finite_states_enum(s[i])]
+ p = finite_states_Zp[finite_states_enum(s[i])]
[finite_states_enum(si_new)]
[finite_states_enum(s[j])];
#endif
@@ -95,7 +95,7 @@ void system<R_t, X_t>::flip_cluster(v_t i0, const R_t& r,
}
#ifndef FINITE_STATES
- p = 1.0 - x * exp(-dE / T);
+ p = 1.0 - exp(-dE / T);
#endif
if (dist(rng) < p) {
diff --git a/lib/include/wolff/system.hpp b/lib/include/wolff/system.hpp
index 6e9c951..32ad38e 100644
--- a/lib/include/wolff/system.hpp
+++ b/lib/include/wolff/system.hpp
@@ -68,8 +68,8 @@ class system {
#endif
}
- void flip_cluster(v_t, const R_t&, std::mt19937&, measurement<R_t, X_t>&, double x = 1.0);
- void run_wolff(N_t, std::function <R_t(std::mt19937&, const system<R_t, X_t>&, v_t)> r_gen, measurement<R_t, X_t>& A, std::mt19937& rng, double x = 1.0);
+ void flip_cluster(v_t, const R_t&, std::mt19937&, measurement<R_t, X_t>&);
+ void run_wolff(N_t, std::function <R_t(std::mt19937&, const system<R_t, X_t>&, v_t)> r_gen, measurement<R_t, X_t>& A, std::mt19937& rng);
};
}