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/linear_regression/benchmark | |
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/linear_regression/benchmark')
-rw-r--r-- | library/cpp/linear_regression/benchmark/pool.cpp | 10 | ||||
-rw-r--r-- | library/cpp/linear_regression/benchmark/pool.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/linear_regression/benchmark/pool.cpp b/library/cpp/linear_regression/benchmark/pool.cpp index 7f2c6a7004..12b547be89 100644 --- a/library/cpp/linear_regression/benchmark/pool.cpp +++ b/library/cpp/linear_regression/benchmark/pool.cpp @@ -51,7 +51,7 @@ bool TPool::TCVIterator::IsValid() const { return Current != InstanceFoldNumbers.end(); } -const TInstance& TPool::TCVIterator::operator*() const { +const TInstance& TPool::TCVIterator::operator*() const { return ParentPool[Current - InstanceFoldNumbers.begin()]; } @@ -75,10 +75,10 @@ void TPool::TCVIterator::Advance() { bool TPool::TCVIterator::TakeCurrent() const { switch (IteratorType) { - case LearnIterator: - return *Current != TestFoldNumber; - case TestIterator: - return *Current == TestFoldNumber; + case LearnIterator: + return *Current != TestFoldNumber; + case TestIterator: + return *Current == TestFoldNumber; } return false; } diff --git a/library/cpp/linear_regression/benchmark/pool.h b/library/cpp/linear_regression/benchmark/pool.h index 43288319c8..4dcf7d7e9e 100644 --- a/library/cpp/linear_regression/benchmark/pool.h +++ b/library/cpp/linear_regression/benchmark/pool.h @@ -14,7 +14,7 @@ struct TInstance { static TInstance FromFeaturesString(const TString& featuresString); }; -struct TPool: public TVector<TInstance> { +struct TPool: public TVector<TInstance> { enum EIteratorType { LearnIterator, TestIterator, @@ -33,7 +33,7 @@ struct TPool: public TVector<TInstance> { const size_t* Current; TMersenne<ui64> RandomGenerator; - + public: TCVIterator(const TPool& parentPool, const size_t foldsCount, @@ -45,10 +45,10 @@ struct TPool: public TVector<TInstance> { bool IsValid() const; - const TInstance& operator*() const; - const TInstance* operator->() const; + const TInstance& operator*() const; + const TInstance* operator->() const; TPool::TCVIterator& operator++(); - + private: void Advance(); bool TakeCurrent() const; |