From d7608a7330a6d615b00da071a8c37df0048d8627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Thu, 14 Sep 2023 10:08:22 +0200 Subject: [PATCH] Revert "Change TugUtils.hpp to TugUtils.cpp" This reverts commit 81774e72c1b7b5332ce3d3a57397ee4a4b521d4a. --- src/TugUtils.hpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/TugUtils.hpp diff --git a/src/TugUtils.hpp b/src/TugUtils.hpp new file mode 100644 index 0000000..225f743 --- /dev/null +++ b/src/TugUtils.hpp @@ -0,0 +1,35 @@ +// #ifndef BTCSUTILS_H_ +// #define BTCSUTILS_H_ + +// #include +// #include +// #include + +// #define throw_invalid_argument(msg) \ +// throw std::invalid_argument(std::string(__FILE__) + ":" + \ +// std::to_string(__LINE__) + ":" + \ +// std::string(msg)) + +// #define throw_out_of_range(msg) \ +// throw std::out_of_range(std::string(__FILE__) + ":" + \ +// std::to_string(__LINE__) + ":" + std::string(msg)) + +// #define time_marker() std::chrono::high_resolution_clock::now() + +// #define diff_time(start, end) \ +// ({ \ +// std::chrono::duration duration = \ +// std::chrono::duration_cast>(end - \ +// start); \ +// duration.count(); \ +// }) +// #endif // BTCSUTILS_H_ + +// // calculates arithmetic or harmonic mean of alpha between two cells +// static double calcAlphaIntercell(double &alpha1, double &alpha2, bool useHarmonic = true) { +// if (useHarmonic) { +// return double(2) / ((double(1)/alpha1) + (double(1)/alpha2)); +// } else { +// return 0.5 * (alpha1 + alpha2); +// } +// } \ No newline at end of file