diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/histogram | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/histogram')
-rw-r--r-- | library/cpp/histogram/adaptive/adaptive_histogram.cpp | 22 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/adaptive_histogram.h | 10 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/auto_histogram.h | 6 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/block_histogram.cpp | 28 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/block_histogram.h | 26 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/common.cpp | 4 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/common.h | 2 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/fixed_bin_histogram.cpp | 16 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/fixed_bin_histogram.h | 6 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/histogram.h | 12 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/merger.h | 6 | ||||
-rw-r--r-- | library/cpp/histogram/adaptive/multi_histogram.h | 10 |
12 files changed, 74 insertions, 74 deletions
diff --git a/library/cpp/histogram/adaptive/adaptive_histogram.cpp b/library/cpp/histogram/adaptive/adaptive_histogram.cpp index cbfc494021..4c41575bad 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; } -} +} diff --git a/library/cpp/histogram/adaptive/adaptive_histogram.h b/library/cpp/histogram/adaptive/adaptive_histogram.h index fa8f48433f..694c198d11 100644 --- a/library/cpp/histogram/adaptive/adaptive_histogram.h +++ b/library/cpp/histogram/adaptive/adaptive_histogram.h @@ -10,7 +10,7 @@ #include <util/generic/vector.h> namespace NKiwiAggr { - class TAdaptiveHistogram: private TNonCopyable, public IHistogram { + class TAdaptiveHistogram: private TNonCopyable, public IHistogram { protected: static const size_t DEFAULT_INTERVALS = 100; @@ -25,7 +25,7 @@ namespace NKiwiAggr { double SumBelow; double SumAbove; - TFastBin(double first_, double second_, double sumBelow = 0, double sumAbove = 0) + TFastBin(double first_, double second_, double sumBelow = 0, double sumAbove = 0) : first(first_) , second(second_) , SumBelow(sumBelow) @@ -33,7 +33,7 @@ namespace NKiwiAggr { { } - bool operator<(const TFastBin& rhs) const { + bool operator<(const TFastBin& rhs) const { return first < rhs.first; } }; @@ -102,7 +102,7 @@ namespace NKiwiAggr { double GetSumBelowBoundImpl(double bound, const TBins& bins, typename TBins::const_iterator rightBin, const TGetSumBelow& getSumBelow) const; }; - template <TQualityFunction QualityFunction> + template <TQualityFunction QualityFunction> class TDefinedAdaptiveHistogram: public TAdaptiveHistogram { public: TDefinedAdaptiveHistogram(size_t intervals, ui64 id = 0) @@ -128,4 +128,4 @@ namespace NKiwiAggr { typedef TDefinedAdaptiveHistogram<CalcWeightQuality> TAdaptiveWeightHistogram; typedef TDefinedAdaptiveHistogram<CalcWardQuality> TAdaptiveWardHistogram; -} +} diff --git a/library/cpp/histogram/adaptive/auto_histogram.h b/library/cpp/histogram/adaptive/auto_histogram.h index 9fdf0b9abe..a7a524d7ef 100644 --- a/library/cpp/histogram/adaptive/auto_histogram.h +++ b/library/cpp/histogram/adaptive/auto_histogram.h @@ -10,7 +10,7 @@ #include <util/generic/yexception.h> namespace NKiwiAggr { - class TAutoHistogram: private TNonCopyable, public IHistogram { + class TAutoHistogram: private TNonCopyable, public IHistogram { private: static const size_t DEFAULT_INTERVALS = 100; @@ -39,7 +39,7 @@ namespace NKiwiAggr { ythrow yexception() << "IHistogram constructor is not defined for TAutoHistogram"; } - virtual ~TAutoHistogram() { + virtual ~TAutoHistogram() { } virtual void Clear() { @@ -145,4 +145,4 @@ namespace NKiwiAggr { } }; -} +} diff --git a/library/cpp/histogram/adaptive/block_histogram.cpp b/library/cpp/histogram/adaptive/block_histogram.cpp index 6586d13ff6..0920bf435b 100644 --- a/library/cpp/histogram/adaptive/block_histogram.cpp +++ b/library/cpp/histogram/adaptive/block_histogram.cpp @@ -52,7 +52,7 @@ namespace { private: void SwapPositions(ui32 x, ui32 y) { - std::swap(A[x], A[y]); + std::swap(A[x], A[y]); Pos[A[x]] = x; Pos[A[y]] = y; } @@ -147,8 +147,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); @@ -188,7 +188,7 @@ namespace NKiwiAggr { } } - void TBlockHistogram::Merge(TVector<IHistogramPtr> histogramsToMerge) { + void TBlockHistogram::Merge(TVector<IHistogramPtr> histogramsToMerge) { Y_UNUSED(histogramsToMerge); ythrow yexception() << "IHistogram::Merge(TVector<IHistogramPtr>) is not defined for TBlockHistogram"; } @@ -204,15 +204,15 @@ namespace NKiwiAggr { } void TBlockHistogram::FromProto(const THistogram& histo) { - Y_VERIFY(histo.HasType(), "Attempt to parse TBlockHistogram from THistogram protobuf with no Type field set"); - ; + Y_VERIFY(histo.HasType(), "Attempt to parse TBlockHistogram from THistogram protobuf with no Type field set"); + ; switch (histo.GetType()) { // check that histogram type is correct case HT_ADAPTIVE_DISTANCE_HISTOGRAM: case HT_ADAPTIVE_WEIGHT_HISTOGRAM: case HT_ADAPTIVE_WARD_HISTOGRAM: case HT_ADAPTIVE_HISTOGRAM: break; // ok - default: // not ok + default: // not ok ythrow yexception() << "Attempt to parse TBlockHistogram from THistogram protobuf record of type = " << (ui32)histo.GetType(); } @@ -312,7 +312,7 @@ namespace NKiwiAggr { Sort(Bins.begin() + PrevSize, Bins.end()); if (PrevSize != 0) { TVector<TWeightedValue> temp(Bins.begin(), Bins.begin() + PrevSize); - std::merge(temp.begin(), temp.end(), Bins.begin() + PrevSize, Bins.end(), Bins.begin()); + std::merge(temp.begin(), temp.end(), Bins.begin() + PrevSize, Bins.end(), Bins.begin()); } } @@ -496,13 +496,13 @@ namespace NKiwiAggr { TBlockWardHistogram::TBlockWardHistogram(size_t intervals, ui64 id, size_t shrinkSize) : TBlockHistogram(HT_ADAPTIVE_WARD_HISTOGRAM, CalcWardQuality, intervals, id, shrinkSize) - { - } + { + } bool TBlockWardHistogram::CalcSplitInfo( const TCumulatives::const_iterator beg, const TCumulatives::const_iterator end, // (!) points to the final element - TSplitInfo& splitInfo // out + TSplitInfo& splitInfo // out ) { if (end - beg < 2) { return false; @@ -543,7 +543,7 @@ namespace NKiwiAggr { TCumulative cumulative = {0., 0.}; cumulatives.push_back(cumulative); for (size_t i = 0; i < Bins.size(); i++) { - cumulative.first += Bins[i].second; + cumulative.first += Bins[i].second; cumulative.second += Bins[i].second * Bins[i].first; cumulatives.push_back(cumulative); } @@ -584,10 +584,10 @@ namespace NKiwiAggr { auto splitBeg = *it; auto splitEnd = *(it + 1); double cnt = (splitEnd->first - splitBeg->first); - double mu = (splitEnd->second - splitBeg->second) / cnt; + double mu = (splitEnd->second - splitBeg->second) / cnt; Bins.push_back(TWeightedValue(mu, cnt)); } } -} +} diff --git a/library/cpp/histogram/adaptive/block_histogram.h b/library/cpp/histogram/adaptive/block_histogram.h index 266bb2f2b2..a302f91aef 100644 --- a/library/cpp/histogram/adaptive/block_histogram.h +++ b/library/cpp/histogram/adaptive/block_histogram.h @@ -27,12 +27,12 @@ namespace NKiwiAggr { */ class TBlockHistogram: private TNonCopyable, public IHistogram { protected: - static const size_t SHRINK_MULTIPLIER = 2; + static const size_t SHRINK_MULTIPLIER = 2; static const size_t GREEDY_SHRINK_MULTIPLIER = 4; - static const size_t DEFAULT_INTERVALS = 100; + static const size_t DEFAULT_INTERVALS = 100; static const size_t DEFAULT_SHRINK_SIZE = DEFAULT_INTERVALS * (SHRINK_MULTIPLIER + GREEDY_SHRINK_MULTIPLIER); - const EHistogramType Type; + const EHistogramType Type; const TQualityFunction CalcQuality; size_t Intervals; @@ -51,7 +51,7 @@ namespace NKiwiAggr { TBlockHistogram(EHistogramType type, TQualityFunction calcQuality, size_t intervals, ui64 id = 0, size_t shrinkSize = DEFAULT_SHRINK_SIZE); - virtual ~TBlockHistogram() { + virtual ~TBlockHistogram() { } virtual void Clear(); @@ -61,7 +61,7 @@ namespace NKiwiAggr { virtual void Merge(const THistogram& histo, double multiplier); virtual void Merge(const TVector<THistogram>& histogramsToMerge); - virtual void Merge(TVector<IHistogramPtr> histogramsToMerge); // not implemented + virtual void Merge(TVector<IHistogramPtr> histogramsToMerge); // not implemented virtual void Multiply(double factor); @@ -99,12 +99,12 @@ namespace NKiwiAggr { // TBlockWeightHistogram ///////////////////////// - class TBlockWeightHistogram: public TBlockHistogram { + class TBlockWeightHistogram: public TBlockHistogram { public: TBlockWeightHistogram(size_t intervals, ui64 id = 0, size_t shrinkSize = DEFAULT_SHRINK_SIZE); - virtual ~TBlockWeightHistogram() { - } + virtual ~TBlockWeightHistogram() { + } private: virtual void FastGreedyShrink(size_t intervals) final; @@ -114,15 +114,15 @@ namespace NKiwiAggr { // TBlockWardHistogram /////////////////////// - class TBlockWardHistogram: public TBlockHistogram { + class TBlockWardHistogram: public TBlockHistogram { public: TBlockWardHistogram(size_t intervals, ui64 id = 0, size_t shrinkSize = DEFAULT_SHRINK_SIZE); - virtual ~TBlockWardHistogram() { - } + virtual ~TBlockWardHistogram() { + } private: - using TCumulative = std::pair<double, double>; // cumulative sum of (weights, weighted centers) + using TCumulative = std::pair<double, double>; // cumulative sum of (weights, weighted centers) using TCumulatives = TVector<TCumulative>; struct TSplitInfo { @@ -145,4 +145,4 @@ namespace NKiwiAggr { TSplitInfo& splitInfo); }; -} +} diff --git a/library/cpp/histogram/adaptive/common.cpp b/library/cpp/histogram/adaptive/common.cpp index afc6322fce..f79a8f2e74 100644 --- a/library/cpp/histogram/adaptive/common.cpp +++ b/library/cpp/histogram/adaptive/common.cpp @@ -10,8 +10,8 @@ namespace NKiwiAggr { } TWeightedValue CalcWardQuality(const TWeightedValue& left, const TWeightedValue& right) { - const double N1 = left.second; - const double N2 = right.second; + 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); diff --git a/library/cpp/histogram/adaptive/common.h b/library/cpp/histogram/adaptive/common.h index c0f7dfb26b..af71023e1b 100644 --- a/library/cpp/histogram/adaptive/common.h +++ b/library/cpp/histogram/adaptive/common.h @@ -3,7 +3,7 @@ #include <utility> namespace NKiwiAggr { - using TWeightedValue = std::pair<double, double>; // value, weight + using TWeightedValue = std::pair<double, double>; // value, weight using TQualityFunction = TWeightedValue (*)(const TWeightedValue&, const TWeightedValue&); TWeightedValue CalcDistanceQuality(const TWeightedValue& left, const TWeightedValue& right); diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp index 558aba9e2d..b92da24809 100644 --- a/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp +++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.cpp @@ -156,7 +156,7 @@ namespace NKiwiAggr { fixedBinHisto->Initialize(); histogramsToMergeRepacked.push_back(histogramsToMerge[i]); } else { - histogramsToMergeRepacked.push_back(IHistogramPtr(new TFixedBinHistogram(histogramsToMerge[i].Get(), Intervals, Id, TrainingSetSize))); // Convert histograms that are not of TFixedBinHistogram type + histogramsToMergeRepacked.push_back(IHistogramPtr(new TFixedBinHistogram(histogramsToMerge[i].Get(), Intervals, Id, TrainingSetSize))); // Convert histograms that are not of TFixedBinHistogram type } histograms.push_back(dynamic_cast<TFixedBinHistogram*>(histogramsToMergeRepacked.back().Get())); } @@ -213,7 +213,7 @@ namespace NKiwiAggr { Initialize(); } Sum *= factor; - for (i32 i = FirstUsedBin; i <= LastUsedBin; ++i) { + for (i32 i = FirstUsedBin; i <= LastUsedBin; ++i) { Freqs[i] *= factor; } } @@ -325,7 +325,7 @@ namespace NKiwiAggr { if (IsEmpty) { return 0.0; } - if (BinRange == 0.0) { // special case - all values added to histogram are the same + if (BinRange == 0.0) { // special case - all values added to histogram are the same return (bound <= ReferencePoint) ? Sum : 0.0; } i32 bin = CalcBin(bound); @@ -337,7 +337,7 @@ namespace NKiwiAggr { } double binStart = BinStart(bin); double binEnd = BinEnd(bin); - double result = (bound < binStart) ? Freqs[bin] : Freqs[bin] * (binEnd - bound) / (binEnd - binStart); + double result = (bound < binStart) ? Freqs[bin] : Freqs[bin] * (binEnd - bound) / (binEnd - binStart); for (i32 i = bin + 1; i <= LastUsedBin; ++i) { result += Freqs[i]; } @@ -351,7 +351,7 @@ namespace NKiwiAggr { if (IsEmpty) { return 0.0; } - if (BinRange == 0.0) { // special case - all values added to histogram are the same + if (BinRange == 0.0) { // special case - all values added to histogram are the same return (bound > ReferencePoint) ? Sum : 0.0; } i32 bin = CalcBin(bound); @@ -363,7 +363,7 @@ namespace NKiwiAggr { } double binStart = BinStart(bin); double binEnd = BinEnd(bin); - double result = (bound > binEnd) ? Freqs[bin] : Freqs[bin] * (bound - binStart) / (binEnd - binStart); + double result = (bound > binEnd) ? Freqs[bin] : Freqs[bin] * (bound - binStart) / (binEnd - binStart); for (i32 i = bin - 1; i >= FirstUsedBin; --i) { result += Freqs[i]; } @@ -516,7 +516,7 @@ namespace NKiwiAggr { memset(&(ReserveFreqs[0]), 0, ReserveFreqs.size() * sizeof(double)); double newBinRange = CalcBinRange(newReferencePoint, newMaxValue); - for (i32 i = FirstUsedBin; i <= LastUsedBin; ++i) { + for (i32 i = FirstUsedBin; i <= LastUsedBin; ++i) { double binStart = BinStart(i); double binEnd = BinEnd(i); double freq = Freqs[i]; @@ -535,4 +535,4 @@ namespace NKiwiAggr { SetFrame(newReferencePoint, newMaxValue, false); } -} +} diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.h b/library/cpp/histogram/adaptive/fixed_bin_histogram.h index bd380bd94a..10106e6f54 100644 --- a/library/cpp/histogram/adaptive/fixed_bin_histogram.h +++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.h @@ -15,7 +15,7 @@ namespace NKiwiAggr { static const size_t DEFAULT_INTERVALS = 100; typedef std::pair<double, double> TWeightedValue; // value, weight - THolder<TVector<TWeightedValue>> TrainingSet; + THolder<TVector<TWeightedValue>> TrainingSet; size_t TrainingSetSize; bool IsInitialized; @@ -40,7 +40,7 @@ namespace NKiwiAggr { TFixedBinHistogram(const THistogram& histo, size_t defaultIntervals = DEFAULT_INTERVALS, ui64 defaultId = 0, size_t trainingSetSize = DEFAULT_TRAINING_SET_SIZE); TFixedBinHistogram(IHistogram* histo, size_t defaultIntervals = DEFAULT_INTERVALS, ui64 defaultId = 0, size_t trainingSetSize = DEFAULT_TRAINING_SET_SIZE); - virtual ~TFixedBinHistogram() { + virtual ~TFixedBinHistogram() { } virtual void Clear(); @@ -88,4 +88,4 @@ namespace NKiwiAggr { } }; -} +} diff --git a/library/cpp/histogram/adaptive/histogram.h b/library/cpp/histogram/adaptive/histogram.h index 360fd9a693..a2ec2e46a4 100644 --- a/library/cpp/histogram/adaptive/histogram.h +++ b/library/cpp/histogram/adaptive/histogram.h @@ -8,7 +8,7 @@ namespace NKiwiAggr { class THistoRec; class IHistogram; - typedef TAtomicSharedPtr<IHistogram> IHistogramPtr; + typedef TAtomicSharedPtr<IHistogram> IHistogramPtr; class IHistogram { public: @@ -18,7 +18,7 @@ namespace NKiwiAggr { // TSomeHistogram(const THistogram& histo); // histo must be acceptable for TSomeHistogram, for example, only with HT_FIXED_BIN_HISTOGRAM for TFixedBinHistogram // TSomeHistogram(IHistogram* histo); // any kind of IHistogram - virtual ~IHistogram() { + virtual ~IHistogram() { } virtual void Clear() = 0; @@ -35,7 +35,7 @@ namespace NKiwiAggr { // factor should be greater then zero virtual void Multiply(double factor) = 0; - virtual void FromProto(const THistogram& histo) = 0; // throws exception in case of wrong histogram type of histo + virtual void FromProto(const THistogram& histo) = 0; // throws exception in case of wrong histogram type of histo virtual void ToProto(THistogram& histo) = 0; virtual void SetId(ui64 id) = 0; @@ -59,8 +59,8 @@ namespace NKiwiAggr { } // Histogram implementation is supposed to clear all precomputed values() if Add() is called after PrecomputePartialSums() - virtual void PrecomputePartialSums() { - } + virtual void PrecomputePartialSums() { + } }; -} +} diff --git a/library/cpp/histogram/adaptive/merger.h b/library/cpp/histogram/adaptive/merger.h index fc9a6b6a4f..6a40754610 100644 --- a/library/cpp/histogram/adaptive/merger.h +++ b/library/cpp/histogram/adaptive/merger.h @@ -6,7 +6,7 @@ namespace NKiwiAggr { class IMerger { private: bool IsMerged; - ui32 AutoMergeInterval; // Call Merge() after each AutoMergeInterval calls of Add(); zero means no autoMerge + ui32 AutoMergeInterval; // Call Merge() after each AutoMergeInterval calls of Add(); zero means no autoMerge ui32 NotMergedCount; public: @@ -17,7 +17,7 @@ namespace NKiwiAggr { { } - virtual ~IMerger() { + virtual ~IMerger() { } // returns true if something is added @@ -65,4 +65,4 @@ namespace NKiwiAggr { virtual void ResetImpl() = 0; }; -} +} diff --git a/library/cpp/histogram/adaptive/multi_histogram.h b/library/cpp/histogram/adaptive/multi_histogram.h index 41caac5ba6..187036cedd 100644 --- a/library/cpp/histogram/adaptive/multi_histogram.h +++ b/library/cpp/histogram/adaptive/multi_histogram.h @@ -31,7 +31,7 @@ namespace NKiwiAggr { FromProto(histograms); } - virtual ~TMultiHistogram() { + virtual ~TMultiHistogram() { } void Clear() { @@ -65,7 +65,7 @@ namespace NKiwiAggr { TVector<ui64> GetIds() const { TVector<ui64> result(0); for (THistogramsMap::const_iterator it = Histograms.begin(); it != Histograms.end(); ++it) { - result.push_back(it->first); + result.push_back(it->first); } return result; } @@ -81,7 +81,7 @@ namespace NKiwiAggr { double GetMaxHistoSum() const { double sum = 0.0; for (THistogramsMap::const_iterator it = Histograms.begin(); it != Histograms.end(); ++it) { - sum = std::max(sum, it->second->GetSum()); + sum = std::max(sum, it->second->GetSum()); } return sum; } @@ -138,6 +138,6 @@ namespace NKiwiAggr { // Good for parsing from THistograms protobuf typedef TMultiHistogram<TAutoHistogram> TAutoMultiHistogram; - typedef TAtomicSharedPtr<TAutoMultiHistogram> TAutoMultiHistogramPtr; + typedef TAtomicSharedPtr<TAutoMultiHistogram> TAutoMultiHistogramPtr; -} +} |