SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
hash.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <seqan3/alphabet/adaptation/all.hpp> // https://github.com/seqan/seqan3/issues/3015
13
14namespace std
15{
22template <typename alphabet_t>
24struct hash<alphabet_t>
25{
34 size_t operator()(alphabet_t const character) const noexcept
35 {
36 return seqan3::to_rank(character);
37 }
38};
39
40} // namespace std
Meta-header for the Alphabet / Adaptation submodule .
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition alphabet/concept.hpp:152
The basis for seqan3::alphabet, but requires only rank interface (not char).
SeqAn specific customisations in the standard namespace.
size_t operator()(alphabet_t const character) const noexcept
Compute the hash for a character.
Definition hash.hpp:34
Hide me