aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/linear_regression/welford.cpp
diff options
context:
space:
mode:
authornkmakarov <nkmakarov@yandex-team.ru>2022-02-10 16:49:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:06 +0300
commit324348a37ed08cf66897faefb0ec4bebfe7804e1 (patch)
tree8736a3afd6953763bf57544746bf1b8b5404dec6 /library/cpp/linear_regression/welford.cpp
parent5eddcf9f19515e4be1e49ba1482d920e007a07d1 (diff)
downloadydb-324348a37ed08cf66897faefb0ec4bebfe7804e1.tar.gz
Restoring authorship annotation for <nkmakarov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/linear_regression/welford.cpp')
-rw-r--r--library/cpp/linear_regression/welford.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/linear_regression/welford.cpp b/library/cpp/linear_regression/welford.cpp
index e27b1994f6..509e80e970 100644
--- a/library/cpp/linear_regression/welford.cpp
+++ b/library/cpp/linear_regression/welford.cpp
@@ -1,5 +1,5 @@
#include "welford.h"
-
+
#include <util/generic/ymath.h>
void TMeanCalculator::Multiply(const double value) {
@@ -28,10 +28,10 @@ double TMeanCalculator::GetSumWeights() const {
return SumWeights.Get();
}
-void TMeanCalculator::Reset() {
- *this = TMeanCalculator();
-}
-
+void TMeanCalculator::Reset() {
+ *this = TMeanCalculator();
+}
+
void TCovariationCalculator::Add(const double firstValue, const double secondValue, const double weight /*= 1.*/) {
SumWeights += weight;
if (SumWeights.Get()) {
@@ -66,10 +66,10 @@ double TCovariationCalculator::GetSumWeights() const {
return SumWeights.Get();
}
-void TCovariationCalculator::Reset() {
- *this = TCovariationCalculator();
-}
-
+void TCovariationCalculator::Reset() {
+ *this = TCovariationCalculator();
+}
+
void TDeviationCalculator::Add(const double value, const double weight /*= 1.*/) {
const double lastMean = MeanCalculator.GetMean();
MeanCalculator.Add(value, weight);
@@ -101,7 +101,7 @@ double TDeviationCalculator::GetStdDev() const {
double TDeviationCalculator::GetSumWeights() const {
return MeanCalculator.GetSumWeights();
}
-
-void TDeviationCalculator::Reset() {
- *this = TDeviationCalculator();
-}
+
+void TDeviationCalculator::Reset() {
+ *this = TDeviationCalculator();
+}