aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorksjuchi <ksjuchi@yandex-team.ru>2022-02-10 16:50:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:57 +0300
commit5c1bb165b6316cb97192253f57b1cca84a724e0a (patch)
tree8651b345477e0f3c67eb3a76ccbadbf65454fd8f
parent9cc851b34f89d2b8ba19d91e816bddf9c17a8f2c (diff)
downloadydb-5c1bb165b6316cb97192253f57b1cca84a724e0a.tar.gz
Restoring authorship annotation for <ksjuchi@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/histogram/adaptive/fixed_bin_histogram.cpp8
-rw-r--r--library/cpp/histogram/adaptive/fixed_bin_histogram.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp
index 558aba9e2d..2a8f5e05ae 100644
--- a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp
+++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp
@@ -495,14 +495,14 @@ namespace NKiwiAggr {
return (BinRange == 0.0) ? BaseIndex : static_cast<i32>(BaseIndex + (value - ReferencePoint) / BinRange);
}
- double TFixedBinHistogram::CalcDensity(double value) {
+ double TFixedBinHistogram::CalcDensity(double value) {
i32 bin = CalcBin(value);
if (bin < 0 || bin >= (i32)Freqs.size() || BinRange == 0.0 || GetSum() == 0) {
return 0.0;
}
- return Freqs[bin] / GetSum() / BinRange;
- }
-
+ return Freqs[bin] / GetSum() / BinRange;
+ }
+
double TFixedBinHistogram::BinStart(i32 i) {
return Max(ReferencePoint + (i - BaseIndex) * BinRange, MinValue);
}
diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.h b/library/cpp/histogram/adaptive/fixed_bin_histogram.h
index bd380bd94a..daf9725a90 100644
--- a/library/cpp/histogram/adaptive/fixed_bin_histogram.h
+++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.h
@@ -71,8 +71,8 @@ namespace NKiwiAggr {
virtual double CalcUpperBoundSafe(double sum);
virtual double CalcLowerBoundSafe(double sum);
- double CalcDensity(double value);
-
+ double CalcDensity(double value);
+
private:
double CalcBinRange(double referencePoint, double maxValue);
void SetFrame(double minValue, double maxValue, bool clear);