diff options
author | reverie <reverie@yandex-team.ru> | 2022-02-10 16:50:56 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:56 +0300 |
commit | 715969815532bc3ecdd5169efec8fc265e700a8b (patch) | |
tree | 67c799e5c8773af0ed5a77123f68eb76761afd74 /library/cpp/histogram/adaptive/fixed_bin_histogram.h | |
parent | 5e6b2e797f35f202ed490c0de2bafba4748b6265 (diff) | |
download | ydb-715969815532bc3ecdd5169efec8fc265e700a8b.tar.gz |
Restoring authorship annotation for <reverie@yandex-team.ru>. Commit 1 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 bd380bd94a..a14e9606e7 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); |