summaryrefslogtreecommitdiff
path: root/lib/include/graph.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-11-01 12:33:37 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-11-01 12:33:37 -0400
commit07906baa42470bad14d2c40f57967691f6118969 (patch)
tree416ae624829967861c7c799103b3ff795e9e36b4 /lib/include/graph.hpp
parent8c4c42d81745ea33c31150fe22e834d97e29ede6 (diff)
downloadfuse_networks-07906baa42470bad14d2c40f57967691f6118969.tar.gz
fuse_networks-07906baa42470bad14d2c40f57967691f6118969.tar.bz2
fuse_networks-07906baa42470bad14d2c40f57967691f6118969.zip
revamped and simplied fracture code with c++
Diffstat (limited to 'lib/include/graph.hpp')
-rw-r--r--lib/include/graph.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/include/graph.hpp b/lib/include/graph.hpp
new file mode 100644
index 0000000..80cdd66
--- /dev/null
+++ b/lib/include/graph.hpp
@@ -0,0 +1,29 @@
+
+#pragma once
+
+#include <cmath>
+#include <vector>
+#include <array>
+
+class graph {
+ public:
+ typedef struct coordinate {
+ double x;
+ double y;
+ } coordinate;
+
+ typedef struct vertex {
+ coordinate r;
+ } vertex;
+
+ typedef std::array<unsigned int, 2> edge;
+
+ std::vector<vertex> vertices;
+ std::vector<edge> edges;
+
+ std::vector<vertex> dual_vertices;
+ std::vector<edge> dual_edges;
+
+ graph(unsigned int L);
+};
+