summaryrefslogtreecommitdiff
path: root/examples/simple_measurement.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple_measurement.hpp')
-rw-r--r--examples/simple_measurement.hpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/simple_measurement.hpp b/examples/simple_measurement.hpp
index 2287c58..518631c 100644
--- a/examples/simple_measurement.hpp
+++ b/examples/simple_measurement.hpp
@@ -1,8 +1,10 @@
#include <wolff/measurement.hpp>
+using namespace wolff;
+
template <class R_t, class X_t>
-class simple_measurement : public wolff_measurement<R_t, X_t> {
+class simple_measurement : public measurement<R_t, X_t> {
private:
N_t n;
@@ -15,7 +17,7 @@ class simple_measurement : public wolff_measurement<R_t, X_t> {
double totalC;
public:
- simple_measurement(const wolff_system<R_t, X_t>& S) {
+ simple_measurement(const system<R_t, X_t>& S) {
n = 0;
M = S.nv * S.s[0];
E = - (S.ne * S.Z(S.s[0], S.s[0]) + S.nv * S.B(S.s[0]));
@@ -25,26 +27,26 @@ class simple_measurement : public wolff_measurement<R_t, X_t> {
totalC = 0;
}
- void pre_cluster(N_t, N_t, const wolff_system<R_t, X_t>&, v_t, const R_t&) {
+ void pre_cluster(N_t, N_t, const system<R_t, X_t>&, v_t, const R_t&) {
C = 0;
}
- void plain_bond_visited(const wolff_system<R_t, X_t>&, v_t, const X_t&, v_t, double dE) {
+ void plain_bond_visited(const system<R_t, X_t>&, v_t, const X_t&, v_t, double dE) {
E += dE;
}
- void ghost_bond_visited(const wolff_system<R_t, X_t>&, v_t, const X_t& s_old, const X_t& s_new, double dE) {
+ void ghost_bond_visited(const system<R_t, X_t>&, v_t, const X_t& s_old, const X_t& s_new, double dE) {
E += dE;
M += s_new - s_old;
}
- void plain_site_transformed(const wolff_system<R_t, X_t>&, v_t, const X_t&) {
+ void plain_site_transformed(const system<R_t, X_t>&, v_t, const X_t&) {
C++;
}
- void ghost_site_transformed(const wolff_system<R_t, X_t>&, const R_t&) {}
+ void ghost_site_transformed(const system<R_t, X_t>&, const R_t&) {}
- void post_cluster(N_t, N_t, const wolff_system<R_t, X_t>&) {
+ void post_cluster(N_t, N_t, const system<R_t, X_t>&) {
totalE += E;
totalM += M;
totalC += C;