From 46485dee5c154e47a17bb1c44d9b71ab3c9dae26 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 20 Oct 2018 16:12:18 -0400 Subject: normalized header gaurds and namespaces --- lib/include/wolff/measurement.hpp | 4 ++-- lib/include/wolff/models/dihedral.hpp | 8 ++++++-- lib/include/wolff/models/dihedral_inf.hpp | 8 +++++++- lib/include/wolff/models/ising.hpp | 7 ++++--- lib/include/wolff/models/orthogonal.hpp | 12 ++++++++++-- lib/include/wolff/models/potts.hpp | 8 ++++++-- lib/include/wolff/models/symmetric.hpp | 8 ++++++-- lib/include/wolff/models/vector.hpp | 9 ++++++++- lib/include/wolff/system.hpp | 4 ++-- 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 #include "potts.hpp" namespace wolff { +#include "../types.h" + template 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 #include "height.hpp" namespace wolff { +#include "../types.h" + template 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 #include -#include "../types.h" #include "../system.hpp" #include "vector.hpp" +namespace wolff { + +#include "../types.h" + template class orthogonal_t : public std::array, q> { public : @@ -198,3 +202,7 @@ orthogonal_t 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 -#include "../types.h" #include "vector.hpp" namespace wolff { +#include "../types.h" + template class potts_t { public: @@ -62,3 +64,5 @@ inline typename potts_t::F_t operator*(double a, const potts_t& 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 -#include "../types.h" #include "potts.hpp" namespace wolff { +#include "../types.h" + template class symmetric_t : public std::array { public: @@ -53,3 +55,5 @@ class symmetric_t : public std::array { } +#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 #include #include +namespace wolff { + #include template @@ -106,3 +109,7 @@ std::ostream& operator<<(std::ostream& os, const vector_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 #include 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 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 + -- cgit v1.2.3-70-g09d2