summaryrefslogtreecommitdiffstats
path: root/util/digest/sequence.h
diff options
context:
space:
mode:
authorbreakneck <[email protected]>2022-02-10 16:47:58 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:58 +0300
commitf860932520ce9bc8540a3c19e84c0109c3437dc5 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /util/digest/sequence.h
parente2021f9a0e54d13b7c48796318b13b66dc625e74 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/digest/sequence.h')
-rw-r--r--util/digest/sequence.h90
1 files changed, 45 insertions, 45 deletions
diff --git a/util/digest/sequence.h b/util/digest/sequence.h
index a8a1bce688a..712331007b8 100644
--- a/util/digest/sequence.h
+++ b/util/digest/sequence.h
@@ -1,48 +1,48 @@
-#pragma once
-
-#include "numeric.h"
-#include <util/generic/hash.h>
-#include <util/generic/array_ref.h>
-
-template <typename ElementHash = void>
-class TRangeHash {
-private:
- template <typename ElementType>
- using TBase = std::conditional_t<
- !std::is_void<ElementHash>::value,
- ElementHash,
+#pragma once
+
+#include "numeric.h"
+#include <util/generic/hash.h>
+#include <util/generic/array_ref.h>
+
+template <typename ElementHash = void>
+class TRangeHash {
+private:
+ template <typename ElementType>
+ using TBase = std::conditional_t<
+ !std::is_void<ElementHash>::value,
+ ElementHash,
THash<ElementType>>;
-
-public:
- template <typename Range>
- size_t operator()(const Range& range) const {
- size_t accumulated = 0;
- for (const auto& element : range) {
- accumulated = CombineHashes(accumulated, TBase<typename Range::value_type>()(element));
- }
- return accumulated;
- }
-};
-
-using TSimpleRangeHash = TRangeHash<>;
-
-template <typename RegionHash = void>
-class TContiguousHash {
-private:
- template <typename ElementType>
- using TBase = std::conditional_t<
- !std::is_void<RegionHash>::value,
- RegionHash,
+
+public:
+ template <typename Range>
+ size_t operator()(const Range& range) const {
+ size_t accumulated = 0;
+ for (const auto& element : range) {
+ accumulated = CombineHashes(accumulated, TBase<typename Range::value_type>()(element));
+ }
+ return accumulated;
+ }
+};
+
+using TSimpleRangeHash = TRangeHash<>;
+
+template <typename RegionHash = void>
+class TContiguousHash {
+private:
+ template <typename ElementType>
+ using TBase = std::conditional_t<
+ !std::is_void<RegionHash>::value,
+ RegionHash,
TRangeHash<ElementType>>;
-
-public:
- template <typename ContainerType>
- auto operator()(const ContainerType& container) const {
- return operator()(MakeArrayRef(container));
- }
-
- template <typename ElementType>
+
+public:
+ template <typename ContainerType>
+ auto operator()(const ContainerType& container) const {
+ return operator()(MakeArrayRef(container));
+ }
+
+ template <typename ElementType>
auto operator()(const TArrayRef<ElementType>& data) const {
- return TBase<ElementType>()(data);
- }
-};
+ return TBase<ElementType>()(data);
+ }
+};