diff options
author | reverie <[email protected]> | 2022-02-10 16:50:56 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:56 +0300 |
commit | a53448e7a898701b4411c68f0d438e703872f1a1 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/histogram/adaptive/fixed_bin_histogram.h | |
parent | 715969815532bc3ecdd5169efec8fc265e700a8b (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/histogram/adaptive/fixed_bin_histogram.h')
-rw-r--r-- | library/cpp/histogram/adaptive/fixed_bin_histogram.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/histogram/adaptive/fixed_bin_histogram.h b/library/cpp/histogram/adaptive/fixed_bin_histogram.h index a14e9606e72..bd380bd94a5 100644 --- a/library/cpp/histogram/adaptive/fixed_bin_histogram.h +++ b/library/cpp/histogram/adaptive/fixed_bin_histogram.h @@ -1,26 +1,26 @@ -#pragma once - +#pragma once + #include "histogram.h" #include <library/cpp/histogram/adaptive/protos/histo.pb.h> #include <util/generic/ptr.h> -#include <util/generic/vector.h> +#include <util/generic/vector.h> #include <utility> - -namespace NKiwiAggr { + +namespace NKiwiAggr { class TFixedBinHistogram: private TNonCopyable, public IHistogram { private: static const size_t DEFAULT_TRAINING_SET_SIZE = 10000; static const size_t DEFAULT_INTERVALS = 100; - + typedef std::pair<double, double> TWeightedValue; // value, weight THolder<TVector<TWeightedValue>> TrainingSet; size_t TrainingSetSize; bool IsInitialized; bool IsEmpty; - + ui64 Id; double MinValue; double MaxValue; @@ -34,15 +34,15 @@ namespace NKiwiAggr { i32 FirstUsedBin; i32 LastUsedBin; i32 BaseIndex; - + public: TFixedBinHistogram(size_t intervals, ui64 id = 0, size_t trainingSetSize = DEFAULT_TRAINING_SET_SIZE); 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 void Clear(); virtual void Add(double value, double weight); |