aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/histogram/adaptive/common.cpp
diff options
context:
space:
mode:
authorsvirg <svirg@yandex-team.ru>2022-02-10 16:50:56 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:56 +0300
commitd7b26a7860e235a7b00891e1ffbc256c7c976f7d (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/histogram/adaptive/common.cpp
parent6b417b6bdff55c365f5835bb18c5a8053b975801 (diff)
downloadydb-d7b26a7860e235a7b00891e1ffbc256c7c976f7d.tar.gz
Restoring authorship annotation for <svirg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/histogram/adaptive/common.cpp')
-rw-r--r--library/cpp/histogram/adaptive/common.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/histogram/adaptive/common.cpp b/library/cpp/histogram/adaptive/common.cpp
index 4d90ff1549..afc6322fce 100644
--- a/library/cpp/histogram/adaptive/common.cpp
+++ b/library/cpp/histogram/adaptive/common.cpp
@@ -1,19 +1,19 @@
-#include "common.h"
-
-namespace NKiwiAggr {
- TWeightedValue CalcDistanceQuality(const TWeightedValue& left, const TWeightedValue& right) {
- return TWeightedValue(right.first - left.first, left.first);
- }
-
- TWeightedValue CalcWeightQuality(const TWeightedValue& left, const TWeightedValue& right) {
- return TWeightedValue(right.second + left.second, left.first);
- }
-
- TWeightedValue CalcWardQuality(const TWeightedValue& left, const TWeightedValue& right) {
+#include "common.h"
+
+namespace NKiwiAggr {
+ TWeightedValue CalcDistanceQuality(const TWeightedValue& left, const TWeightedValue& right) {
+ return TWeightedValue(right.first - left.first, left.first);
+ }
+
+ TWeightedValue CalcWeightQuality(const TWeightedValue& left, const TWeightedValue& right) {
+ return TWeightedValue(right.second + left.second, left.first);
+ }
+
+ TWeightedValue CalcWardQuality(const TWeightedValue& left, const TWeightedValue& right) {
const double N1 = left.second;
const double N2 = right.second;
- const double mu1 = left.first;
- const double mu2 = right.first;
- return TWeightedValue(N1 * N2 / (N1 + N2) * (mu1 - mu2) * (mu1 - mu2), left.first);
- }
-}
+ const double mu1 = left.first;
+ const double mu2 = right.first;
+ return TWeightedValue(N1 * N2 / (N1 + N2) * (mu1 - mu2) * (mu1 - mu2), left.first);
+ }
+}