68namespace seqan3::detail::adl_only
72template <
typename... args_t>
73void to_rank(args_t...) =
delete;
77struct to_rank_cpo :
public detail::customisation_point_object<to_rank_cpo, 2>
80 using base_t = detail::customisation_point_object<to_rank_cpo, 2>;
88 template <
typename alphabet_t>
97 template <
typename alphabet_t>
106 template <
typename alphabet_t>
158inline constexpr auto to_rank = detail::adl_only::to_rank_cpo{};
166template <
typename semi_alphabet_type>
178namespace seqan3::detail::adl_only
182template <
typename... args_t>
187struct assign_rank_to_cpo :
public detail::customisation_point_object<assign_rank_to_cpo, 2>
190 using base_t = detail::customisation_point_object<assign_rank_to_cpo, 2>;
192 using base_t::base_t;
207 template <
typename alphabet_t>
208 static constexpr auto
210 static_cast<alphabet_t
>(seqan3::custom::alphabet<alphabet_t>::assign_rank_to(rank, alphabet))
226 template <
typename alphabet_t>
227 static constexpr auto
242 template <
typename alphabet_t>
243 static constexpr auto
300inline constexpr auto assign_rank_to = detail::adl_only::assign_rank_to_cpo{};
308namespace seqan3::detail::adl_only
312template <
typename... args_t>
313void to_char(args_t...) =
delete;
317struct to_char_cpo :
public detail::customisation_point_object<to_char_cpo, 2>
320 using base_t = detail::customisation_point_object<to_char_cpo, 2>;
322 using base_t::base_t;
328 template <
typename alphabet_t>
337 template <
typename alphabet_t>
346 template <
typename alphabet_t>
399inline constexpr auto to_char = detail::adl_only::to_char_cpo{};
407template <
typename alphabet_type>
408 requires requires (alphabet_type
const a) {
419namespace seqan3::detail::adl_only
423template <
typename... args_t>
428struct assign_char_to_cpo :
public detail::customisation_point_object<assign_char_to_cpo, 2>
431 using base_t = detail::customisation_point_object<assign_char_to_cpo, 2>;
433 using base_t::base_t;
448 template <
typename alphabet_t>
449 static constexpr auto
451 static_cast<alphabet_t
>(seqan3::custom::alphabet<alphabet_t>::assign_char_to(chr, alphabet))
467 template <
typename alphabet_t>
468 static constexpr auto
483 template <
typename alphabet_t>
484 static constexpr auto
486 static_cast<alphabet_t
>(alphabet.assign_char(chr))
541inline constexpr auto assign_char_to = detail::adl_only::assign_char_to_cpo{};
549namespace seqan3::detail::adl_only
553template <
typename... args_t>
560template <
typename alphabet_t>
561struct char_is_valid_for_cpo :
public detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>
564 using base_t = detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>;
566 using base_t::base_t;
571 template <
typename alphabet_type>
572 using alphabet_or_type_identity =
573 std::conditional_t<std::is_nothrow_default_constructible_v<std::remove_cvref_t<alphabet_type>>,
574 std::remove_cvref_t<alphabet_type>,
575 std::type_identity<alphabet_type>>;
581 template <
typename alphabet_type = alphabet_t>
583 seqan3::custom::alphabet<alphabet_type>::char_is_valid(chr) ==
true
596 template <
typename alphabet_type = alphabet_t>
605 template <
typename alphabet_type = alphabet_t>
607 std::remove_cvref_t<alphabet_type>::char_is_valid(chr) ==
true
630 template <
typename alphabet_type = alphabet_t>
689template <
typename alph_t>
693inline constexpr auto char_is_valid_for = detail::adl_only::char_is_valid_for_cpo<alph_t>{};
701namespace seqan3::detail::adl_only
706struct assign_char_strictly_to_fn
709 template <
typename alphabet_t>
711 requires requires () {
717 throw seqan3::invalid_char_assignment{detail::type_name_as_string<alphabet_t>, chr};
761namespace seqan3::detail::adl_only
765template <
typename... args_t>
772template <
typename alphabet_t>
773struct alphabet_size_cpo :
public detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>
776 using base_t = detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>;
778 using base_t::base_t;
783 template <
typename alphabet_type>
784 using alphabet_or_type_identity =
785 std::conditional_t<std::is_nothrow_default_constructible_v<std::remove_cvref_t<alphabet_type>>
786 && seqan3::is_constexpr_default_constructible_v<std::remove_cvref_t<alphabet_type>>,
787 std::remove_cvref_t<alphabet_type>,
788 std::type_identity<alphabet_type>>;
793 template <
typename alphabet_type = alphabet_t>
795 seqan3::custom::alphabet<alphabet_type>::alphabet_size
806 template <
typename alphabet_type = alphabet_t>
814 template <
typename alphabet_type = alphabet_t>
816 std::remove_cvref_t<alphabet_type>::alphabet_size
868template <
typename alph_t>
870 { detail::adl_only::alphabet_size_cpo<alph_t>{}() };
872inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_cpo<alph_t>{}();
1005template <
typename t>
1052template <
typename t>
1082template <cereal_output_archive archive_t, semialphabet alphabet_t>
1101template <cereal_input_archive archive_t,
typename wrapped_alphabet_t>
1102void CEREAL_LOAD_MINIMAL_FUNCTION_NAME(archive_t
const &,
1103 wrapped_alphabet_t && l,
1104 alphabet_rank_t<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>
const & r)
1105 requires semialphabet<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>
1107 assign_rank_to(r,
static_cast<detail::strip_cereal_wrapper_t<wrapped_alphabet_t> &
>(l));
1115namespace seqan3::detail
1130template <
typename t>
1131concept constexpr_semialphabet = semialphabet<t> &&
requires {
1133 requires SEQAN3_IS_CONSTEXPR(
to_rank(std::remove_reference_t<t>{}));
1151template <
typename t>
1152concept writable_constexpr_semialphabet = constexpr_semialphabet<t> && writable_semialphabet<t> &&
requires {
1172template <
typename t>
1173concept constexpr_alphabet = constexpr_semialphabet<t> && alphabet<t> &&
requires {
1175 requires SEQAN3_IS_CONSTEXPR(
to_char(std::remove_reference_t<t>{}));
1194template <
typename t>
1195concept writable_constexpr_alphabet =
1196 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.
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:106
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:517
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:381
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition alphabet/concept.hpp:834
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 alphabet/concept.hpp:393
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition alphabet/concept.hpp:288
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 alphabet/concept.hpp:164
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 alphabet/concept.hpp:661
constexpr auto assign_char_strictly_to
Assign a character to an alphabet object, throw if the character is not valid.
Definition alphabet/concept.hpp:721
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition alphabet/concept.hpp:152
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.
T is_nothrow_copy_constructible_v
A namespace for third party and standard library specialisations of SeqAn customisation points.
Definition char.hpp:40
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition alphabet/concept.hpp:46
Provides traits to inspect some information of a type, for example its name.
Provides concepts that do not have equivalents in C++20.