maomao90's Library
A C++20 library for competitive programming.
Loading...
Searching...
No Matches
hashing_custom_hash.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <type_traits>
4
8
9namespace maomao90 {
10using namespace std;
11template <typename T>
12concept Hashing = requires(T v) {
14 requires internal::concepts::Iterable<decltype(v.get_v())>;
15 requires is_same_v<typename decltype(v.get_v())::value_type,
16 typename T::mint::umod_type>;
17};
18template <Hashing T> struct HashingCustomHash {
19 constexpr size_t operator()(const T &o) const {
20 return internal::hashing::hash_function(o.get_v());
21 }
22};
23} // namespace maomao90
Definition hashing_custom_hash.hpp:12
Definition modint.hpp:23
Definition concepts.hpp:40
unsigned long long hash_function(const T &x)
Definition hashing.hpp:45
Definition hashmap.hpp:8
Definition hashing_custom_hash.hpp:18
constexpr size_t operator()(const T &o) const
Definition hashing_custom_hash.hpp:19