diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/histogram/adaptive/fixed_bin_histogram.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/histogram/adaptive/fixed_bin_histogram.cpp')
-rw-r--r-- | library/cpp/histogram/adaptive/fixed_bin_histogram.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp index 558aba9e2d..903b076a30 100644 --- a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp +++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp @@ -102,7 +102,7 @@ namespace NKiwiAggr { if (!IsInitialized) { if (!TrainingSet) { - TrainingSet.Reset(new TVector<TWeightedValue>(0)); + TrainingSet.Reset(new TVector<TWeightedValue>(0)); } TrainingSet->push_back(TWeightedValue(value, weight)); if (TrainingSet->size() >= TrainingSetSize) { @@ -128,17 +128,17 @@ namespace NKiwiAggr { ythrow yexception() << "Method is not implemented for TFixedBinHistogram"; } - void TFixedBinHistogram::Merge(const TVector<THistogram>& histogramsToMerge) { - TVector<IHistogramPtr> parsedHistogramsToMerge; + void TFixedBinHistogram::Merge(const TVector<THistogram>& histogramsToMerge) { + TVector<IHistogramPtr> parsedHistogramsToMerge; for (size_t i = 0; i < histogramsToMerge.size(); ++i) { parsedHistogramsToMerge.push_back(IHistogramPtr(new TAutoHistogram(histogramsToMerge[i], Intervals, Id))); } Merge(parsedHistogramsToMerge); } - void TFixedBinHistogram::Merge(TVector<IHistogramPtr> histogramsToMerge) { - TVector<IHistogramPtr> histogramsToMergeRepacked(0); - TVector<TFixedBinHistogram*> histograms(0); + void TFixedBinHistogram::Merge(TVector<IHistogramPtr> histogramsToMerge) { + TVector<IHistogramPtr> histogramsToMergeRepacked(0); + TVector<TFixedBinHistogram*> histograms(0); // put current histogram to the vector of histograms to merge and clear self if (!Empty()) { @@ -485,7 +485,7 @@ namespace NKiwiAggr { } SetFrame(MinElement(TrainingSet->begin(), TrainingSet->end(), CompareWeightedValue)->first, MaxElement(TrainingSet->begin(), TrainingSet->end(), CompareWeightedValue)->first, true); - for (TVector<TWeightedValue>::const_iterator it = TrainingSet->begin(); it != TrainingSet->end(); ++it) { + for (TVector<TWeightedValue>::const_iterator it = TrainingSet->begin(); it != TrainingSet->end(); ++it) { Freqs[CalcBin(it->first)] += it->second; } TrainingSet.Destroy(); |