Skip to content

Commit

Permalink
#550: Remove C++17 functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
annoviko committed Oct 4, 2019
1 parent 55e40c4 commit 5ef3b5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ccore/src/utils/stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ double var(const TypeContainer & p_container, const double p_mean) {
result += std::pow(value - p_mean, 2);
}

result /= (std::size(p_container) - 1);
result /= (p_container.size() - 1);
return result;
}

Expand Down Expand Up @@ -141,7 +141,7 @@ std::vector<double> pdf(const TypeContainer & p_container) {
double m = 1.0 / std::sqrt(2.0 * ccore::utils::math::pi);

std::vector<double> result;
result.reserve(std::size(p_container));
result.reserve(p_container.size());

for (auto & value : p_container) {
result.push_back(m * std::exp(-0.5 * std::pow(value, 2)));
Expand Down

0 comments on commit 5ef3b5a

Please sign in to comment.