diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:40:02 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:40:02 -0400 |
commit | 1c72acfda984f73ddc96d51596f9e761a963944a (patch) | |
tree | ff56fa98c7641fb9890eaf82f3f57ff31959668a /lib/include/graph.hpp | |
parent | 3f7f20f21f583ca2de566bea08a87eac4b17ad29 (diff) | |
download | fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.tar.gz fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.tar.bz2 fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.zip |
ran clang-format
Diffstat (limited to 'lib/include/graph.hpp')
-rw-r--r-- | lib/include/graph.hpp | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/lib/include/graph.hpp b/lib/include/graph.hpp index 0452339..9d2b5a1 100644 --- a/lib/include/graph.hpp +++ b/lib/include/graph.hpp @@ -1,50 +1,49 @@ #pragma once -#include <cmath> -#include <vector> +#include <algorithm> #include <array> -#include <unordered_map> -#include <random> -#include <list> +#include <cmath> #include <exception> -#include <algorithm> +#include <list> +#include <random> +#include <unordered_map> +#include <vector> #include "array_hash.hpp" class graph { - public: - typedef struct coordinate { - double x; - double y; - } coordinate; - - typedef struct vertex { - coordinate r; - std::vector<unsigned> nd; - std::vector<unsigned> ne; - std::vector<coordinate> polygon; - } vertex; - - typedef struct edge { - std::array<unsigned, 2> v; - coordinate r; - std::array<bool, 2> crossings; - } edge; - - coordinate L; - - std::vector<vertex> vertices; - std::vector<edge> edges; - - std::vector<vertex> dual_vertices; - std::vector<edge> dual_edges; - - graph(unsigned Nx, unsigned Ny); - graph(double Lx, double Ly, std::mt19937& rng); - graph(unsigned n, double a, std::mt19937& rng); - - void helper(unsigned n, std::mt19937& rng); - graph const rotate(); +public: + typedef struct coordinate { + double x; + double y; + } coordinate; + + typedef struct vertex { + coordinate r; + std::vector<unsigned> nd; + std::vector<unsigned> ne; + std::vector<coordinate> polygon; + } vertex; + + typedef struct edge { + std::array<unsigned, 2> v; + coordinate r; + std::array<bool, 2> crossings; + } edge; + + coordinate L; + + std::vector<vertex> vertices; + std::vector<edge> edges; + + std::vector<vertex> dual_vertices; + std::vector<edge> dual_edges; + + graph(unsigned Nx, unsigned Ny); + graph(double Lx, double Ly, std::mt19937& rng); + graph(unsigned n, double a, std::mt19937& rng); + + void helper(unsigned n, std::mt19937& rng); + graph const rotate(); }; - |