diff options
| author | svirg <[email protected]> | 2022-02-10 16:50:56 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:56 +0300 | 
| commit | d7b26a7860e235a7b00891e1ffbc256c7c976f7d (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/histogram/adaptive/common.cpp | |
| parent | 6b417b6bdff55c365f5835bb18c5a8053b975801 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/histogram/adaptive/common.cpp')
| -rw-r--r-- | library/cpp/histogram/adaptive/common.cpp | 34 | 
1 files changed, 17 insertions, 17 deletions
| diff --git a/library/cpp/histogram/adaptive/common.cpp b/library/cpp/histogram/adaptive/common.cpp index 4d90ff15491..afc6322fce3 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); +    } +} | 
