diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-01-14 15:47:59 -0500 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-01-14 15:47:59 -0500 |
commit | 49ac78a6c04e215950bc9c0f97368605e63da15b (patch) | |
tree | 64b770c543a0c90bc7dcbc06ceaaa31e96e541ce /lib/include/wolff.hpp | |
parent | 994cbf1a3b611ff4c94ced3b1630e51fd249d7ed (diff) | |
download | c++-49ac78a6c04e215950bc9c0f97368605e63da15b.tar.gz c++-49ac78a6c04e215950bc9c0f97368605e63da15b.tar.bz2 c++-49ac78a6c04e215950bc9c0f97368605e63da15b.zip |
Large refactoring around changes in the graph class.
- Graphs now use lists of references instead of vectors of indicies.
- Vertices and edges have associated classes that can be given arbitrary properties via template specification.
- All essential library headers have been combined into one, wolff.hpp.
Diffstat (limited to 'lib/include/wolff.hpp')
-rw-r--r-- | lib/include/wolff.hpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/include/wolff.hpp b/lib/include/wolff.hpp deleted file mode 100644 index 7e909c8..0000000 --- a/lib/include/wolff.hpp +++ /dev/null @@ -1,32 +0,0 @@ - -#ifndef WOLFF_H -#define WOLFF_H - -#include "wolff/cluster.hpp" -#include "wolff/measurement.hpp" - -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) { - - std::uniform_int_distribution<v_t> dist(0, nv - 1); - - for (N_t n = 0; n < N; n++) { - v_t i0 = dist(rng); - R_t r = r_gen(rng, *this, i0); - - A.pre_cluster(n, N, *this, i0, r); - - this->flip_cluster(i0, r, rng, A); - - A.post_cluster(n, N, *this); - } -} - -} - -#endif - |