summaryrefslogtreecommitdiff
path: root/lib/include/wolff/models/height.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-14 15:47:59 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-01-14 15:47:59 -0500
commit49ac78a6c04e215950bc9c0f97368605e63da15b (patch)
tree64b770c543a0c90bc7dcbc06ceaaa31e96e541ce /lib/include/wolff/models/height.hpp
parent994cbf1a3b611ff4c94ced3b1630e51fd249d7ed (diff)
downloadc++-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 'lib/include/wolff/models/height.hpp')
-rw-r--r--lib/include/wolff/models/height.hpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/lib/include/wolff/models/height.hpp b/lib/include/wolff/models/height.hpp
deleted file mode 100644
index 9d7e87c..0000000
--- a/lib/include/wolff/models/height.hpp
+++ /dev/null
@@ -1,57 +0,0 @@
-
-#pragma once
-
-#include <cmath>
-#include <wolff/types.h>
-
-namespace wolff {
-
-template <class T>
-struct height_t {
- T x;
-
- height_t() : x(0) {}
- height_t(T x) : x(x) {}
-
- typedef T M_t;
- typedef double F_t;
-
- inline T operator*(v_t a) const {
- return x * a;
- }
-
- inline double operator*(double a) const {
- return x * a;
- }
-
- inline T operator-(const height_t& h) const {
- return x - h.x;
- }
-};
-
-template <class T>
-inline typename height_t<T>::M_t operator*(v_t a, height_t<T> h) {
- return h * a;
-}
-
-template <class T>
-inline typename height_t<T>::F_t operator*(double a, height_t<T> h) {
- return h * a;
-}
-
-template <class T>
-inline T& operator+=(T& M, const height_t<T> &h) {
- M += h.x;
-
- return M;
-}
-
-template <class T>
-inline T& operator-=(T& M, const height_t<T> &h) {
- M -= h.x;
-
- return M;
-}
-
-}
-