Loading...
Searching...
No Matches
alphabet/nucleotide/concept.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <seqan3/alphabet/concept.hpp>
// ============================================================================
// complement()
// ============================================================================
namespace seqan3::detail::adl_only
{
template <typename... args_t>
void complement(args_t...) = delete;
struct complement_cpo : public detail::customisation_point_object<complement_cpo, 2>
{
using base_t = detail::customisation_point_object<complement_cpo, 2>;
using base_t::base_t;
template <typename alphabet_t>
static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<2>, alphabet_t && alphabet)(
/*return*/ seqan3::custom::alphabet<alphabet_t>::complement(std::forward<alphabet_t>(alphabet)) /*;*/
);
template <typename alphabet_t>
static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<1>, alphabet_t && alphabet)(
/*return*/ complement(std::forward<alphabet_t>(alphabet)) /*;*/
);
template <typename alphabet_t>
static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<0>, alphabet_t && alphabet)(
/*return*/ std::forward<alphabet_t>(alphabet).complement() /*;*/
);
};
} // namespace seqan3::detail::adl_only
namespace seqan3
{
inline constexpr auto complement = detail::adl_only::complement_cpo{};
// ============================================================================
// nucleotide_alphabet concept
// ============================================================================
template <typename t>
concept nucleotide_alphabet = alphabet<t> && requires (t val) {
{ seqan3::complement(val) };
};
} // 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