30 template <
typename ...args_t>
34 struct is_pair_open_fn
43 template <typename rna_structure_t>
45 requires requires (rna_structure_t
const chr) { { impl(priority_tag<2>{}, chr) }; }
47 constexpr
auto operator()(rna_structure_t
const chr)
const noexcept
49 static_assert(noexcept(impl(priority_tag<2>{}, chr)),
50 "Only overloads that are marked noexcept are picked up by seqan3::is_pair_open().");
51 static_assert(
std::same_as<
bool, decltype(impl(priority_tag<2>{}, chr))>,
52 "The return type of your is_pair_open() implementation must be 'bool'.");
54 return impl(priority_tag<2>{}, chr);
96 inline constexpr
auto is_pair_open = detail::adl_only::is_pair_open_fn{};
109 template <
typename ...args_t>
113 struct is_pair_close_fn
122 template <typename rna_structure_t>
124 requires requires (rna_structure_t
const chr) { { impl(priority_tag<2>{}, chr) }; }
126 constexpr
auto operator()(rna_structure_t
const chr)
const noexcept
128 static_assert(noexcept(impl(priority_tag<2>{}, chr)),
129 "Only overloads that are marked noexcept are picked up by seqan3::is_pair_close().");
130 static_assert(
std::same_as<
bool, decltype(impl(priority_tag<2>{}, chr))>,
131 "The return type of your is_pair_close() implementation must be 'bool'.");
133 return impl(priority_tag<2>{}, chr);
188 template <
typename ...args_t>
192 struct is_unpaired_fn
201 template <typename rna_structure_t>
203 requires requires (rna_structure_t
const chr) { { impl(priority_tag<2>{}, chr) }; }
205 constexpr
auto operator()(rna_structure_t
const chr)
const noexcept
207 static_assert(noexcept(impl(priority_tag<2>{}, chr)),
208 "Only overloads that are marked noexcept are picked up by seqan3::is_unpaired().");
209 static_assert(
std::same_as<
bool, decltype(impl(priority_tag<2>{}, chr))>,
210 "The return type of your is_unpaired() implementation must be 'bool'.");
212 return impl(priority_tag<2>{}, chr);
254 inline constexpr
auto is_unpaired = detail::adl_only::is_unpaired_fn{};
267 template <
typename ...args_t>
275 template <
typename alph_t,
277 seqan3::is_constexpr_default_constructible_v<remove_cvref_t<alph_t>>,
280 struct max_pseudoknot_depth_fn
289 template <
typename dummy =
int>
291 requires requires { { impl(priority_tag<2>{}, s_alph_t{}, dummy{}) }; }
293 constexpr
auto operator()()
const noexcept
295 static_assert(noexcept(impl(priority_tag<2>{}, s_alph_t{})),
296 "Only overloads that are marked noexcept are picked up by seqan3::max_pseudoknot_depth.");
298 "The return type of your max_pseudoknot_depth implementation must be convertible to size_t.");
300 "Only overloads that are marked constexpr are picked up by seqan3::max_pseudoknot_depth.");
302 return impl(priority_tag<2>{}, s_alph_t{});
308 template <
typename alph_t>
309 requires requires { { max_pseudoknot_depth_fn<alph_t>{} }; }
310 inline constexpr
auto max_pseudoknot_depth_obj = max_pseudoknot_depth_fn<alph_t>{};
360 template <
typename alph_t>
362 requires requires { { detail::adl_only::max_pseudoknot_depth_fn<alph_t>{} }; } &&
363 requires { { detail::adl_only::max_pseudoknot_depth_obj<alph_t>() }; }
377 template <
typename ...args_t>
381 struct pseudoknot_id_fn
390 template <typename rna_structure_t>
392 requires requires (rna_structure_t
const chr) { { impl(priority_tag<2>{}, chr) }; }
394 constexpr
auto operator()(rna_structure_t
const chr)
const noexcept
396 static_assert(noexcept(impl(priority_tag<2>{}, chr)),
397 "Only overloads that are marked noexcept are picked up by seqan3::pseudoknot_id().");
399 "The return type of your pseudoknot_id() implementation must be convertible to std::optional<size_t>.");
401 return impl(priority_tag<2>{}, chr);
486 template <
typename t>
496 requires seqan3::max_pseudoknot_depth<t> > 0;
#define SEQAN3_CPO_IMPL(PRIO, TERM)
A macro that helps defining the overload set of a customisation point.
Definition: customisation_point.hpp:45
The main SeqAn3 namespace.
A concept that indicates whether an alphabet represents RNA structure.
#define SEQAN3_IS_CONSTEXPR(...)
Returns true if the expression passed to this macro can be evaluated at compile time, false otherwise.
Definition: function.hpp:25
Definition: concept.hpp:41
Helper utilities for defining customisation point objects.
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition: concept.hpp:46
constexpr auto pseudoknot_id
Retrieve an id for the level of a pseudoknotted interaction (also known as 'page number').
Definition: concept.hpp:445
constexpr auto is_pair_close
Check whether the given character represents a leftward interaction in an RNA structure.
Definition: concept.hpp:175
constexpr auto is_pair_open
Check whether the given character represents a rightward interaction in an RNA structure.
Definition: concept.hpp:96
The generic alphabet concept that covers most data types used in ranges.
The std::constructible_from concept specifies that a variable of type T can be initialized with the g...
Provides C++20 additions to the type_traits header.
constexpr auto max_pseudoknot_depth
A type trait that holds the ability of the structure alphabet to represent pseudoknots, i.e. crossing interactions, up to a certain depth.
Definition: concept.hpp:365
Core alphabet concept and free function/type trait wrappers.
The concept std::same_as<T, U> is satisfied if and only if T and U denote the same type...
constexpr auto is_unpaired
Check whether the given character represents an unpaired nucleotide in an RNA structure.
Definition: concept.hpp:254
The identity transformation (a transformation_trait that returns the input).
Definition: type_traits:31