From 643baba78eb15a685d959aae718ee3eeade2f806 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 19 Oct 2018 01:26:14 -0400 Subject: big library overhual, fixed all examples, added documentation with sphinx --- examples/On.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'examples/On.cpp') diff --git a/examples/On.cpp b/examples/On.cpp index e045f52..6c3f0fd 100644 --- a/examples/On.cpp +++ b/examples/On.cpp @@ -7,6 +7,7 @@ #include #include + #include int main(int argc, char *argv[]) { @@ -56,10 +57,13 @@ int main(int argc, char *argv[]) { return H * s; }; + // initialize the lattice + graph G(D, L); + // initialize the system - wolff_system, vector_t> S(D, L, T, Z, B); + system, vector_t> S(G, T, Z, B); - std::function (std::mt19937&, const vector_t&)> gen_R = generate_rotation_uniform; + std::function (std::mt19937&, const system, vector_t>&, v_t)> gen_R = generate_rotation_uniform; // initailze the measurement object simple_measurement A(S); @@ -69,7 +73,7 @@ int main(int argc, char *argv[]) { std::mt19937 rng{seed}; // run wolff N times - wolff, vector_t>(N, S, gen_R, A, rng); + S.run_wolff(N, gen_R, A, rng); // print the result of our measurements std::cout << "Wolff complete!\nThe average energy per site was " << A.avgE() / S.nv -- cgit v1.2.3-70-g09d2