diff options
Diffstat (limited to 'libprakpp/include')
-rw-r--r-- | libprakpp/include/prakphys.hpp | 2 | ||||
-rw-r--r-- | libprakpp/include/praktable.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libprakpp/include/prakphys.hpp b/libprakpp/include/prakphys.hpp index 1eaef5a..1db7a94 100644 --- a/libprakpp/include/prakphys.hpp +++ b/libprakpp/include/prakphys.hpp @@ -19,7 +19,7 @@ TP hh = 1.054571817e-34; TP k = 1.380649e-23; TP G = 6.67430151515e-11; TP e = 1.602176634e-19; -TP m_e = 1.6021766342828e-31; +TP m_e = 9.109383713928e-31; TP m_p = 1.672621925955252e-27; TP m_n = 1.674927500568585e-27; TP R = 8.31446261815324; diff --git a/libprakpp/include/praktable.hpp b/libprakpp/include/praktable.hpp index 2cfa500..f00e7b9 100644 --- a/libprakpp/include/praktable.hpp +++ b/libprakpp/include/praktable.hpp @@ -472,7 +472,7 @@ public: // Fills a specified column with the same value `v` table &fill_column(const std::string &column, dtype v) { - apply([&v](const std::vector<dtype>& _) -> dtype { return v; }, {}, column); + apply([&v](const std::vector<dtype>& _) -> dtype { return v; }, std::vector<std::string>{}, column); return *this; } @@ -538,7 +538,7 @@ public: dtype avg = col_avg(column); for (auto it = begin(column); it != end(column); ++it) accum += (*it - avg)*(*it - avg); - return std::sqrt(accum); + return std::sqrt(accum / rows); } // takes columns [columns], calculates average and standard deviation for each row, puts them into `avg` and `stddev` and deleted original columns |