diff options
Diffstat (limited to 'lib/include')
-rw-r--r-- | lib/include/wolff/measurement.hpp | 4 | ||||
-rw-r--r-- | lib/include/wolff/models/dihedral.hpp | 8 | ||||
-rw-r--r-- | lib/include/wolff/models/dihedral_inf.hpp | 8 | ||||
-rw-r--r-- | lib/include/wolff/models/ising.hpp | 7 | ||||
-rw-r--r-- | lib/include/wolff/models/orthogonal.hpp | 12 | ||||
-rw-r--r-- | lib/include/wolff/models/potts.hpp | 8 | ||||
-rw-r--r-- | lib/include/wolff/models/symmetric.hpp | 8 | ||||
-rw-r--r-- | lib/include/wolff/models/vector.hpp | 9 | ||||
-rw-r--r-- | lib/include/wolff/system.hpp | 4 | ||||
-rw-r--r-- | lib/include/wolff/types.h | 5 |
10 files changed, 56 insertions, 17 deletions
diff --git a/lib/include/wolff/measurement.hpp b/lib/include/wolff/measurement.hpp index 604eaf5..59684fb 100644 --- a/lib/include/wolff/measurement.hpp +++ b/lib/include/wolff/measurement.hpp @@ -1,6 +1,6 @@ -#ifndef WOLFF_MEASUREMENTS -#define WOLFF_MEASUREMENTS +#ifndef WOLFF_MEASUREMENTS_H +#define WOLFF_MEASUREMENTS_H #include "system.hpp" diff --git a/lib/include/wolff/models/dihedral.hpp b/lib/include/wolff/models/dihedral.hpp index 50272e3..cf4b067 100644 --- a/lib/include/wolff/models/dihedral.hpp +++ b/lib/include/wolff/models/dihedral.hpp @@ -1,11 +1,13 @@ -#pragma once +#ifndef WOLFF_MODELS_DIHEDRAL_H +#define WOLFF_MODELS_DIHEDRAL_H -#include <wolff/types.h> #include "potts.hpp" namespace wolff { +#include "../types.h" + template <q_t q> class dihedral_t { public: @@ -50,3 +52,5 @@ class dihedral_t { } +#endif + diff --git a/lib/include/wolff/models/dihedral_inf.hpp b/lib/include/wolff/models/dihedral_inf.hpp index b88e91b..33d5cec 100644 --- a/lib/include/wolff/models/dihedral_inf.hpp +++ b/lib/include/wolff/models/dihedral_inf.hpp @@ -1,10 +1,14 @@ -#include "../types.h" +#ifndef WOLFF_MODELS_DIHEDRAL_INF_H +#define WOLFF_MODELS_DIHEDRAL_INF_H + #include <cmath> #include "height.hpp" namespace wolff { +#include "../types.h" + template <class T> class dihedral_inf_t { public: @@ -49,3 +53,5 @@ class dihedral_inf_t { } +#endif + diff --git a/lib/include/wolff/models/ising.hpp b/lib/include/wolff/models/ising.hpp index 39d0ad6..d2f6f91 100644 --- a/lib/include/wolff/models/ising.hpp +++ b/lib/include/wolff/models/ising.hpp @@ -1,14 +1,15 @@ -#ifndef WOLFF_MODELS_ISING -#define WOLFF_MODELS_ISING +#ifndef WOLFF_MODELS_ISING_H +#define WOLFF_MODELS_ISING_H #define WOLFF_FINITE_STATES_N 2 -#include "../types.h" #include "../system.hpp" namespace wolff { +#include "../types.h" + class ising_t { public: bool x; diff --git a/lib/include/wolff/models/orthogonal.hpp b/lib/include/wolff/models/orthogonal.hpp index 58203b7..514c88a 100644 --- a/lib/include/wolff/models/orthogonal.hpp +++ b/lib/include/wolff/models/orthogonal.hpp @@ -1,13 +1,17 @@ -#pragma once +#ifndef WOLFF_MODELS_ORTHOGONAL_H +#define WOLFF_MODELS_ORTHOGONAL_H #include <random> #include <cmath> -#include "../types.h" #include "../system.hpp" #include "vector.hpp" +namespace wolff { + +#include "../types.h" + template <q_t q, class T> class orthogonal_t : public std::array<std::array<T, q>, q> { public : @@ -198,3 +202,7 @@ orthogonal_t <q, double> generate_rotation_perturbation (std::mt19937& r, const return m; } +} + +#endif + diff --git a/lib/include/wolff/models/potts.hpp b/lib/include/wolff/models/potts.hpp index 3d0a0e9..a0cb368 100644 --- a/lib/include/wolff/models/potts.hpp +++ b/lib/include/wolff/models/potts.hpp @@ -1,13 +1,15 @@ -#pragma once +#ifndef WOLFF_MODELS_POTTS_H +#define WOLFF_MODELS_POTTS_H #include <cmath> -#include "../types.h" #include "vector.hpp" namespace wolff { +#include "../types.h" + template <q_t q> class potts_t { public: @@ -62,3 +64,5 @@ inline typename potts_t<q>::F_t operator*(double a, const potts_t<q>& s) { } +#endif + diff --git a/lib/include/wolff/models/symmetric.hpp b/lib/include/wolff/models/symmetric.hpp index 71431c5..d15a7ba 100644 --- a/lib/include/wolff/models/symmetric.hpp +++ b/lib/include/wolff/models/symmetric.hpp @@ -1,13 +1,15 @@ -#pragma once +#ifndef WOLFF_MODELS_SYMMETRIC_H +#define WOLFF_MODELS_SYMMETRIC_H #include <array> -#include "../types.h" #include "potts.hpp" namespace wolff { +#include "../types.h" + template <q_t q> class symmetric_t : public std::array<q_t, q> { public: @@ -53,3 +55,5 @@ class symmetric_t : public std::array<q_t, q> { } +#endif + diff --git a/lib/include/wolff/models/vector.hpp b/lib/include/wolff/models/vector.hpp index 1d635c8..e4c4a1c 100644 --- a/lib/include/wolff/models/vector.hpp +++ b/lib/include/wolff/models/vector.hpp @@ -1,10 +1,13 @@ -#pragma once +#ifndef WOLFF_MODELS_VECTOR_H +#define WOLFF_MODELS_VECTOR_H #include <cmath> #include <array> #include <iostream> +namespace wolff { + #include <wolff/types.h> template <q_t q, class T> @@ -106,3 +109,7 @@ std::ostream& operator<<(std::ostream& os, const vector_t<q, T>&v) { return os; } +} + +#endif + diff --git a/lib/include/wolff/system.hpp b/lib/include/wolff/system.hpp index 4aa8ee4..fa9a1b0 100644 --- a/lib/include/wolff/system.hpp +++ b/lib/include/wolff/system.hpp @@ -1,6 +1,6 @@ -#ifndef WOLFF_STATE_H -#define WOLFF_STATE_H +#ifndef WOLFF_SYSTEM_H +#define WOLFF_SYSTEM_H #include <functional> #include <vector> diff --git a/lib/include/wolff/types.h b/lib/include/wolff/types.h index 1bc8c4d..5bbaa6d 100644 --- a/lib/include/wolff/types.h +++ b/lib/include/wolff/types.h @@ -1,4 +1,7 @@ +#ifndef WOLFF_TYPES_H +#define WOLFF_TYPES_H + #include <inttypes.h> typedef uint_fast32_t v_t; // vertex and edge indices @@ -25,3 +28,5 @@ typedef uint_fast64_t N_t; // cycle iterator #define SCNL SCNuFAST16 #define SCNN SCNuFAST64 +#endif + |