71namespace seqan3::detail::adl_only
75template <
typename ...args_t>
76void to_rank(args_t ...) =
delete;
80struct to_rank_cpo :
public detail::customisation_point_object<to_rank_cpo, 2>
83 using base_t = detail::customisation_point_object<to_rank_cpo, 2>;
91 template <
typename alphabet_t>
101 template <
typename alphabet_t>
111 template <
typename alphabet_t>
114 std::forward<alphabet_t>(
alphabet).to_rank()
164inline constexpr auto to_rank = detail::adl_only::to_rank_cpo{};
172template <
typename semi_alphabet_type>
174 requires requires { {
seqan3::to_rank(std::declval<semi_alphabet_type>()) }; }
184namespace seqan3::detail::adl_only
188template <
typename ...args_t>
193struct assign_rank_to_cpo :
public detail::customisation_point_object<assign_rank_to_cpo, 2>
196 using base_t = detail::customisation_point_object<assign_rank_to_cpo, 2>;
198 using base_t::base_t;
213 template <
typename alphabet_t>
234 template <
typename alphabet_t>
252 template <
typename alphabet_t>
257 static_cast<alphabet_t
>(std::forward<alphabet_t>(
alphabet).assign_rank(rank))
312inline constexpr auto assign_rank_to = detail::adl_only::assign_rank_to_cpo{};
320namespace seqan3::detail::adl_only
324template <
typename ...args_t>
325void to_char(args_t ...) =
delete;
329struct to_char_cpo :
public detail::customisation_point_object<to_char_cpo, 2>
332 using base_t = detail::customisation_point_object<to_char_cpo, 2>;
334 using base_t::base_t;
340 template <
typename alphabet_t>
350 template <
typename alphabet_t>
360 template <
typename alphabet_t>
363 std::forward<alphabet_t>(
alphabet).to_char()
414inline constexpr auto to_char = detail::adl_only::to_char_cpo{};
422template <
typename alphabet_type>
434namespace seqan3::detail::adl_only
438template <
typename ...args_t>
443struct assign_char_to_cpo :
public detail::customisation_point_object<assign_char_to_cpo, 2>
446 using base_t = detail::customisation_point_object<assign_char_to_cpo, 2>;
448 using base_t::base_t;
463 template <
typename alphabet_t>
484 template <
typename alphabet_t>
502 template <
typename alphabet_t>
507 static_cast<alphabet_t
>(
alphabet.assign_char(chr))
562inline constexpr auto assign_char_to = detail::adl_only::assign_char_to_cpo{};
570namespace seqan3::detail::adl_only
574template <
typename ...args_t>
581template <
typename alphabet_t>
582struct char_is_valid_for_cpo :
public detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>
585 using base_t = detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>;
587 using base_t::base_t;
592 template <
typename alphabet_type>
593 using alphabet_or_type_identity
602 template <
typename alphabet_type = alphabet_t>
603 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<3>, alphabet_char_t<alphabet_type>
const chr)
618 template <
typename alphabet_type = alphabet_t>
619 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<2>, alphabet_char_t<alphabet_type>
const chr)
628 template <
typename alphabet_type = alphabet_t>
629 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<1>, alphabet_char_t<alphabet_type>
const chr)
654 template <
typename alphabet_type = alphabet_t>
655 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<0>, alphabet_char_t<alphabet_type>
const chr)
714template <
typename alph_t>
716 requires requires { {
to_char(std::declval<alph_t>()) }; }
718inline constexpr auto char_is_valid_for = detail::adl_only::char_is_valid_for_cpo<alph_t>{};
726namespace seqan3::detail::adl_only
731struct assign_char_strictly_to_fn
734 template <
typename alphabet_t>
740 std::convertible_to, alphabet_t);
745 if (!seqan3::char_is_valid_for<alphabet_t>(chr))
790namespace seqan3::detail::adl_only
794template <
typename ...args_t>
801template <
typename alphabet_t>
802struct alphabet_size_cpo :
public detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>
805 using base_t = detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>;
807 using base_t::base_t;
812 template <
typename alphabet_type>
813 using alphabet_or_type_identity
815 seqan3::is_constexpr_default_constructible_v<std::remove_cvref_t<alphabet_type>>,
822 template <
typename alphabet_type = alphabet_t>
836 template <
typename alphabet_type = alphabet_t>
845 template <
typename alphabet_type = alphabet_t>
852#if SEQAN3_WORKAROUND_GCC_89953
853template <
typename alph_t>
854 requires requires { { alphabet_size_cpo<alph_t>{} }; }
855inline constexpr auto alphabet_size_obj = alphabet_size_cpo<alph_t>{};
906#if SEQAN3_WORKAROUND_GCC_89953
907template <
typename alph_t>
909 requires requires { { detail::adl_only::alphabet_size_cpo<alph_t>{} }; } &&
910 requires { { detail::adl_only::alphabet_size_obj<alph_t>() }; }
912inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_obj<alph_t>();
914template <
typename alph_t>
916 requires requires { { detail::adl_only::alphabet_size_cpo<alph_t>{}() }; }
918inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_cpo<alph_t>{}();
969 std::totally_ordered<t> &&
970 std::copy_constructible<t> &&
971 std::is_nothrow_copy_constructible_v<t> &&
974 { seqan3::alphabet_size<t> };
1018template <
typename t>
1057template <
typename t>
1105template <
typename t>
1137template <cereal_output_archive archive_t, semialphabet alphabet_t>
1138alphabet_rank_t<alphabet_t> CEREAL_SAVE_MINIMAL_FUNCTION_NAME(archive_t
const &, alphabet_t
const & l)
1156template <cereal_input_archive archive_t,
typename wrapped_alphabet_t>
1157void CEREAL_LOAD_MINIMAL_FUNCTION_NAME(archive_t
const &,
1158 wrapped_alphabet_t && l,
1159 alphabet_rank_t<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>
const & r)
1162 assign_rank_to(r,
static_cast<detail::strip_cereal_wrapper_t<wrapped_alphabet_t> &
>(l));
1170namespace seqan3::detail
1185template <
typename t>
1207template <
typename t>
1229template <
typename t>
1230SEQAN3_CONCEPT constexpr_alphabet = constexpr_semialphabet<t> &&
alphabet<t> &&
requires
1252template <
typename t>
1253SEQAN3_CONCEPT writable_constexpr_alphabet =
1254 constexpr_alphabet<t> && writable_constexpr_semialphabet<t> &&
writable_alphabet<t> &&
requires
Exceptions thrown by entities in the alphabet module.
Provides various type traits on generic types.
Adaptions of concepts from the Cereal library.
Provides concepts for core language types and relations that don't have concepts in C++20 (yet).
Helper utilities for defining customisation point objects (CPOs).
#define SEQAN3_CPO_OVERLOAD(...)
A macro that helps to define a seqan3::detail::customisation_point_object.
Definition: customisation_point.hpp:102
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition: concept.hpp:526
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:387
decltype(seqan3::to_rank(std::declval< semi_alphabet_type >())) alphabet_rank_t
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank....
Definition: concept.hpp:167
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition: concept.hpp:861
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition: concept.hpp:294
decltype(seqan3::to_char(std::declval< alphabet_type const >())) alphabet_char_t
The char_type of the alphabet; defined as the return type of seqan3::to_char.
Definition: concept.hpp:399
constexpr auto char_is_valid_for
Returns whether a character is in the valid set of a seqan3::alphabet (usually implies a bijective ma...
Definition: concept.hpp:670
constexpr auto assign_char_strictly_to
Assign a character to an alphabet object, throw if the character is not valid.
Definition: concept.hpp:734
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:155
The generic alphabet concept that covers most data types used in ranges.
The basis for seqan3::alphabet, but requires only rank interface (not char).
Refines seqan3::alphabet and adds assignability.
A refinement of seqan3::semialphabet that adds assignability.
A namespace for third party and standard library specialisations of SeqAn customisation points.
Definition: char.hpp:44
The main SeqAn3 namespace.
Definition: cigar_operation_table.hpp:2
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition: concept.hpp:49
An exception typically thrown by seqan3::alphabet::assign_char_strict.
Definition: exception.hpp:30
Provides traits to inspect some information of a type, for example its name.
The <type_traits> header from C++20's standard library.