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 /examples/On.cpp | |
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 'examples/On.cpp')
-rw-r--r-- | examples/On.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/examples/On.cpp b/examples/On.cpp index 6c3f0fd..6885d2e 100644 --- a/examples/On.cpp +++ b/examples/On.cpp @@ -3,23 +3,21 @@ #include <iostream> #include <chrono> -#include "simple_measurement.hpp" - -#include <wolff/models/vector.hpp> -#include <wolff/models/orthogonal.hpp> +#include <wolff_models/vector.hpp> +#include <wolff_models/orthogonal.hpp> -#include <wolff.hpp> +#include "simple_measurement.hpp" int main(int argc, char *argv[]) { // set defaults - N_t N = (N_t)1e4; - D_t D = 2; - L_t L = 128; + unsigned N = (unsigned)1e4; + unsigned D = 2; + unsigned L = 128; double T = 0.8; vector_t<WOLFF_N, double> H; H.fill(0.0); - q_t Hi = 0; + unsigned Hi = 0; int opt; @@ -27,7 +25,7 @@ int main(int argc, char *argv[]) { while ((opt = getopt(argc, argv, "N:D:L:T:H:")) != -1) { switch (opt) { case 'N': // number of steps - N = (N_t)atof(optarg); + N = (unsigned)atof(optarg); break; case 'D': // dimension D = atoi(optarg); @@ -58,12 +56,12 @@ int main(int argc, char *argv[]) { }; // initialize the lattice - graph G(D, L); + graph<> G(D, L); // initialize the system system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>> S(G, T, Z, B); - std::function <orthogonal_t<WOLFF_N, double>(std::mt19937&, const system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>>&, v_t)> gen_R = generate_rotation_uniform<WOLFF_N>; + std::function <orthogonal_t<WOLFF_N, double>(std::mt19937&, const system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>, graph<>>&, const graph<>::vertex)> gen_R = generate_rotation_uniform<WOLFF_N, graph<>>; // initailze the measurement object simple_measurement A(S); |