From 5ee716791bf7a8ca74c1670a6887a53ab92141f6 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Mon, 14 Apr 2025 00:34:52 +0300 Subject: added 218, 226, 234, 240 --- libprakpp/include/prakphys.hpp | 2 +- libprakpp/include/praktable.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'libprakpp/include') 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 { return v; }, {}, column); + apply([&v](const std::vector& _) -> dtype { return v; }, std::vector{}, 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 -- cgit v1.2.3-70-g09d2