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
commit6b417b6bdff55c365f5835bb18c5a8053b975801 (patch)
tree879a609bb97de971de25f96711cb5e510013cbd6 /library/cpp/histogram/adaptive/common.cpp
parent0f79d22ae2d0756b8c99339136f54b76c1a7aee2 (diff)
downloadydb-6b417b6bdff55c365f5835bb18c5a8053b975801.tar.gz
Restoring authorship annotation for <svirg@yandex-team.ru>. Commit 1 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 afc6322fce..4d90ff1549 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);
+ }
+}