diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-10 21:45:32 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-10 21:45:32 -0400 |
commit | a43ff1f98e9b9814f858bccb11c174b418458491 (patch) | |
tree | ae7e094d914eddb8a1ae9548420ba8c2f329ffae /lib/dihedral_inf.h | |
parent | 6e264d243f0b29d90e90b605b6cdeab8227129c9 (diff) | |
download | c++-a43ff1f98e9b9814f858bccb11c174b418458491.tar.gz c++-a43ff1f98e9b9814f858bccb11c174b418458491.tar.bz2 c++-a43ff1f98e9b9814f858bccb11c174b418458491.zip |
big rearrangement of files to make libraries and example (research) files clearer, and changed to c++ std lib random numbers
Diffstat (limited to 'lib/dihedral_inf.h')
-rw-r--r-- | lib/dihedral_inf.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/dihedral_inf.h b/lib/dihedral_inf.h deleted file mode 100644 index a064b48..0000000 --- a/lib/dihedral_inf.h +++ /dev/null @@ -1,47 +0,0 @@ - -#include "types.h" -#include <cmath> -#include "height.h" - -template <class T> -class dihedral_inf_t { - public: - bool is_reflection; - T x; - - dihedral_inf_t() : is_reflection(false), x(0) {} - dihedral_inf_t(bool x, T y) : is_reflection(x), x(y) {} - - height_t<T> act(const height_t<T>& h) const { - if (this->is_reflection) { - return height_t(this->x - h.x); - } else { - return height_t(this->x + h.x); - } - } - - dihedral_inf_t<T> act(const dihedral_inf_t<T>& r) const { - if (this->is_reflection) { - return dihedral_inf_t<T>(!r.is_reflection, this->x - r.x); - } else { - return dihedral_inf_t<T>(r.is_reflection, this->x + r.x); - } - } - - height_t<T> act_inverse(const height_t<T>& h) const { - if (this->is_reflection) { - return this->act(h); - } else { - return height_t(h.x - this->x); - } - } - - dihedral_inf_t<T> act_inverse(const dihedral_inf_t<T>& r) const { - if (this->is_reflection) { - return this->act(r); - } else { - return dihedral_inf_t<T>(r.is_reflection, r.x - this->x); - } - } -}; - |