aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/histogram/adaptive/adaptive_histogram.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/histogram/adaptive/adaptive_histogram.cpp
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/histogram/adaptive/adaptive_histogram.cpp')
-rw-r--r--library/cpp/histogram/adaptive/adaptive_histogram.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/histogram/adaptive/adaptive_histogram.cpp b/library/cpp/histogram/adaptive/adaptive_histogram.cpp
index 4c41575bad..cbfc494021 100644
--- a/library/cpp/histogram/adaptive/adaptive_histogram.cpp
+++ b/library/cpp/histogram/adaptive/adaptive_histogram.cpp
@@ -78,8 +78,8 @@ namespace NKiwiAggr {
if (histo.GetType() == HT_ADAPTIVE_DISTANCE_HISTOGRAM ||
histo.GetType() == HT_ADAPTIVE_WEIGHT_HISTOGRAM ||
histo.GetType() == HT_ADAPTIVE_WARD_HISTOGRAM ||
- histo.GetType() == HT_ADAPTIVE_HISTOGRAM)
- {
+ histo.GetType() == HT_ADAPTIVE_HISTOGRAM)
+ {
Y_VERIFY(histo.FreqSize() == histo.PositionSize(), "Corrupted histo");
for (size_t j = 0; j < histo.FreqSize(); ++j) {
double value = histo.GetPosition(j);
@@ -130,7 +130,7 @@ namespace NKiwiAggr {
if (adaptiveHisto) {
histogramsToMergeRepacked.push_back(histogramsToMerge[i]);
} else {
- histogramsToMergeRepacked.push_back(IHistogramPtr(new TAdaptiveHistogram(histogramsToMerge[i].Get(), Intervals, Id, CalcQuality))); // Convert histograms that are not of TFixedBinHistogram type
+ histogramsToMergeRepacked.push_back(IHistogramPtr(new TAdaptiveHistogram(histogramsToMerge[i].Get(), Intervals, Id, CalcQuality))); // Convert histograms that are not of TFixedBinHistogram type
}
if (histogramsToMergeRepacked.back()->Empty()) {
continue;
@@ -180,8 +180,8 @@ namespace NKiwiAggr {
}
void TAdaptiveHistogram::FromProto(const THistogram& histo) {
- Y_VERIFY(histo.HasType(), "Attempt to parse TAdaptiveHistogram from THistogram protobuf with no Type field set");
- ;
+ Y_VERIFY(histo.HasType(), "Attempt to parse TAdaptiveHistogram from THistogram protobuf with no Type field set");
+ ;
switch (histo.GetType()) { // check that histogram type could be deduced
case HT_ADAPTIVE_DISTANCE_HISTOGRAM:
case HT_ADAPTIVE_WEIGHT_HISTOGRAM:
@@ -191,7 +191,7 @@ namespace NKiwiAggr {
if (CalcQuality != nullptr)
break; // ok
[[fallthrough]];
- default: // not ok
+ default: // not ok
ythrow yexception() << "Attempt to parse TAdaptiveHistogram from THistogram protobuf record of type = " << (ui32)histo.GetType();
}
@@ -300,7 +300,7 @@ namespace NKiwiAggr {
bound,
PrecomputedBins,
LowerBound(PrecomputedBins.begin(), PrecomputedBins.end(), TFastBin{bound, -1.0, 0, 0}),
- [](const auto& it) { return it->SumAbove; });
+ [](const auto& it) { return it->SumAbove; });
} else {
return GetSumAboveBoundImpl(
bound,
@@ -313,7 +313,7 @@ namespace NKiwiAggr {
sum += it->second;
}
return sum;
- });
+ });
}
}
@@ -333,7 +333,7 @@ namespace NKiwiAggr {
bound,
PrecomputedBins,
LowerBound(PrecomputedBins.begin(), PrecomputedBins.end(), TFastBin{bound, -1.0, 0, 0}),
- [](const auto& it) { return it->SumBelow; });
+ [](const auto& it) { return it->SumBelow; });
} else {
return GetSumBelowBoundImpl(
bound,
@@ -345,7 +345,7 @@ namespace NKiwiAggr {
sum += it->second;
}
return sum;
- });
+ });
}
}
@@ -634,4 +634,4 @@ namespace NKiwiAggr {
return sum;
}
-}
+}