diff options
author | dobrokot <dobrokot@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:07 +0300 |
commit | 25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch) | |
tree | bd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /library/cpp/containers/comptrie/comptrie_trie.h | |
parent | 1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff) | |
download | ydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz |
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/comptrie_trie.h')
-rw-r--r-- | library/cpp/containers/comptrie/comptrie_trie.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/containers/comptrie/comptrie_trie.h b/library/cpp/containers/comptrie/comptrie_trie.h index 40ec1e52b3..0ddc04c058 100644 --- a/library/cpp/containers/comptrie/comptrie_trie.h +++ b/library/cpp/containers/comptrie/comptrie_trie.h @@ -110,10 +110,10 @@ public: return Skipper; } - TPacker GetPacker() const { - return Packer; - } - + TPacker GetPacker() const { + return Packer; + } + bool HasCorrectSkipper() const { return Skipper.GetPacker() == &Packer; } @@ -175,9 +175,9 @@ public: }; TConstIterator Begin() const; - TConstIterator begin() const; + TConstIterator begin() const; TConstIterator End() const; - TConstIterator end() const; + TConstIterator end() const; // Returns an iterator pointing to the smallest key in the trie >= the argument. // TODO: misleading name. Should be called LowerBound for consistency with stl. @@ -422,22 +422,22 @@ typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::Begin() co } template <class T, class D, class S> -typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::begin() const { - return Begin(); -} - -template <class T, class D, class S> +typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::begin() const { + return Begin(); +} + +template <class T, class D, class S> typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::End() const { NCompactTrie::TOpaqueTrie self(DataHolder.AsCharPtr(), DataHolder.Length(), Skipper); return TConstIterator(self, EmptyValue, true, Packer); } template <class T, class D, class S> -typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::end() const { - return End(); -} - -template <class T, class D, class S> +typename TCompactTrie<T, D, S>::TConstIterator TCompactTrie<T, D, S>::end() const { + return End(); +} + +template <class T, class D, class S> size_t TCompactTrie<T, D, S>::Size() const { size_t res = 0; for (TConstIterator it = Begin(); it != End(); ++it) |