SeqAn3
3.4.0
The Modern C++ library for sequence analysis.
Toggle main menu visibility
Loading...
Searching...
No Matches
alphabet/nucleotide/concept.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
10
11
#pragma once
12
13
#include <concepts>
14
15
#include <
seqan3/alphabet/concept.hpp
>
16
17
// ============================================================================
18
// complement()
19
// ============================================================================
20
21
namespace
seqan3::detail::adl_only
22
{
23
25
template
<
typename
... args_t>
26
void
complement
(args_t...) =
delete
;
27
30
struct
complement_cpo :
public
detail::customisation_point_object<complement_cpo, 2>
31
{
33
using
base_t = detail::customisation_point_object<complement_cpo, 2>;
35
using
base_t::base_t;
36
41
template
<
typename
alphabet_t>
42
static
constexpr
auto
SEQAN3_CPO_OVERLOAD
(priority_tag<2>, alphabet_t && alphabet)(
43
/*return*/
seqan3::custom::alphabet<alphabet_t>::complement(
std::forward<alphabet_t>
(alphabet))
/*;*/
44
);
45
50
template
<
typename
alphabet_t>
51
static
constexpr
auto
SEQAN3_CPO_OVERLOAD
(priority_tag<1>, alphabet_t && alphabet)(
52
/*return*/
complement
(
std::forward<alphabet_t>
(alphabet))
/*;*/
53
);
54
59
template
<
typename
alphabet_t>
60
static
constexpr
auto
SEQAN3_CPO_OVERLOAD
(priority_tag<0>, alphabet_t && alphabet)(
61
/*return*/
std::forward<alphabet_t>
(alphabet).complement()
/*;*/
62
);
63
};
64
65
}
// namespace seqan3::detail::adl_only
66
67
namespace
seqan3
68
{
69
73
108
inline
constexpr
auto
complement
= detail::adl_only::complement_cpo{};
110
111
// ============================================================================
112
// nucleotide_alphabet concept
113
// ============================================================================
114
143
template
<
typename
t>
144
concept
nucleotide_alphabet
=
alphabet<t>
&&
requires
(t val) {
145
{
seqan3::complement
(val) };
146
};
148
149
}
// namespace seqan3
concept.hpp
Core alphabet concept and free function/type trait wrappers.
SEQAN3_CPO_OVERLOAD
#define SEQAN3_CPO_OVERLOAD(...)
A macro that helps to define a seqan3::detail::customisation_point_object.
Definition
customisation_point.hpp:106
std::forward
T forward(T... args)
seqan3::complement
constexpr auto complement
Return the complement of a nucleotide object.
Definition
alphabet/nucleotide/concept.hpp:102
alphabet
The generic alphabet concept that covers most data types used in ranges.
nucleotide_alphabet
A concept that indicates whether an alphabet represents nucleotides.
seqan3
The main SeqAn3 namespace.
Definition
aligned_sequence_concept.hpp:26
Hide me
Version:
seqan3
alphabet
nucleotide
concept.hpp
Generated on
for SeqAn3 by
1.17.0