70namespace seqan3::detail::adl_only
74template <
typename ...args_t>
75void to_rank(args_t ...) =
delete;
79struct to_rank_cpo :
public detail::customisation_point_object<to_rank_cpo, 2>
82 using base_t = detail::customisation_point_object<to_rank_cpo, 2>;
90 template <
typename alphabet_t>
100 template <
typename alphabet_t>
110 template <
typename alphabet_t>
113 std::forward<alphabet_t>(
alphabet).to_rank()
163inline constexpr auto to_rank = detail::adl_only::to_rank_cpo{};
171template <
typename semi_alphabet_type>
173 requires requires { {
seqan3::to_rank(std::declval<semi_alphabet_type>()) }; }
183namespace seqan3::detail::adl_only
187template <
typename ...args_t>
192struct assign_rank_to_cpo :
public detail::customisation_point_object<assign_rank_to_cpo, 2>
195 using base_t = detail::customisation_point_object<assign_rank_to_cpo, 2>;
197 using base_t::base_t;
212 template <
typename alphabet_t>
233 template <
typename alphabet_t>
251 template <
typename alphabet_t>
256 static_cast<alphabet_t
>(std::forward<alphabet_t>(
alphabet).assign_rank(rank))
311inline constexpr auto assign_rank_to = detail::adl_only::assign_rank_to_cpo{};
319namespace seqan3::detail::adl_only
323template <
typename ...args_t>
324void to_char(args_t ...) =
delete;
328struct to_char_cpo :
public detail::customisation_point_object<to_char_cpo, 2>
331 using base_t = detail::customisation_point_object<to_char_cpo, 2>;
333 using base_t::base_t;
339 template <
typename alphabet_t>
349 template <
typename alphabet_t>
359 template <
typename alphabet_t>
362 std::forward<alphabet_t>(
alphabet).to_char()
413inline constexpr auto to_char = detail::adl_only::to_char_cpo{};
421template <
typename alphabet_type>
433namespace seqan3::detail::adl_only
437template <
typename ...args_t>
442struct assign_char_to_cpo :
public detail::customisation_point_object<assign_char_to_cpo, 2>
445 using base_t = detail::customisation_point_object<assign_char_to_cpo, 2>;
447 using base_t::base_t;
462 template <
typename alphabet_t>
483 template <
typename alphabet_t>
501 template <
typename alphabet_t>
506 static_cast<alphabet_t
>(
alphabet.assign_char(chr))
561inline constexpr auto assign_char_to = detail::adl_only::assign_char_to_cpo{};
569namespace seqan3::detail::adl_only
573template <
typename ...args_t>
580template <
typename alphabet_t>
581struct char_is_valid_for_cpo :
public detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>
584 using base_t = detail::customisation_point_object<char_is_valid_for_cpo<alphabet_t>, 3>;
586 using base_t::base_t;
591 template <
typename alphabet_type>
592 using alphabet_or_type_identity
601 template <
typename alphabet_type = alphabet_t>
602 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<3>, alphabet_char_t<alphabet_type>
const chr)
617 template <
typename alphabet_type = alphabet_t>
618 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<2>, alphabet_char_t<alphabet_type>
const chr)
627 template <
typename alphabet_type = alphabet_t>
628 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<1>, alphabet_char_t<alphabet_type>
const chr)
653 template <
typename alphabet_type = alphabet_t>
654 static constexpr auto SEQAN3_CPO_OVERLOAD(priority_tag<0>, alphabet_char_t<alphabet_type>
const chr)
713template <
typename alph_t>
715 requires requires { {
to_char(std::declval<alph_t>()) }; }
717inline constexpr auto char_is_valid_for = detail::adl_only::char_is_valid_for_cpo<alph_t>{};
725namespace seqan3::detail::adl_only
730struct assign_char_strictly_to_fn
733 template <
typename alphabet_t>
739 {seqan3::char_is_valid_for<alphabet_t>(chr)} -> std::same_as<bool>;
743 if (!seqan3::char_is_valid_for<alphabet_t>(chr))
788namespace seqan3::detail::adl_only
792template <
typename ...args_t>
799template <
typename alphabet_t>
800struct alphabet_size_cpo :
public detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>
803 using base_t = detail::customisation_point_object<alphabet_size_cpo<alphabet_t>, 2>;
805 using base_t::base_t;
810 template <
typename alphabet_type>
811 using alphabet_or_type_identity
813 seqan3::is_constexpr_default_constructible_v<std::remove_cvref_t<alphabet_type>>,
820 template <
typename alphabet_type = alphabet_t>
834 template <
typename alphabet_type = alphabet_t>
843 template <
typename alphabet_type = alphabet_t>
898template <
typename alph_t>
900 requires requires { { detail::adl_only::alphabet_size_cpo<alph_t>{}() }; }
902inline constexpr auto alphabet_size = detail::adl_only::alphabet_size_cpo<alph_t>{}();
952 std::totally_ordered<t> &&
953 std::copy_constructible<t> &&
954 std::is_nothrow_copy_constructible_v<t> &&
957 { seqan3::alphabet_size<t> };
1001template <
typename t>
1040template <
typename t>
1088template <
typename t>
1120template <cereal_output_archive archive_t, semialphabet alphabet_t>
1121alphabet_rank_t<alphabet_t> CEREAL_SAVE_MINIMAL_FUNCTION_NAME(archive_t
const &, alphabet_t
const & l)
1139template <cereal_input_archive archive_t,
typename wrapped_alphabet_t>
1140void CEREAL_LOAD_MINIMAL_FUNCTION_NAME(archive_t
const &,
1141 wrapped_alphabet_t && l,
1142 alphabet_rank_t<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>
const & r)
1145 assign_rank_to(r,
static_cast<detail::strip_cereal_wrapper_t<wrapped_alphabet_t> &
>(l));
1153namespace seqan3::detail
1168template <
typename t>
1190template <
typename t>
1212template <
typename t>
1213concept constexpr_alphabet = constexpr_semialphabet<t> &&
alphabet<t> &&
requires
1235template <
typename t>
1236concept writable_constexpr_alphabet =
1237 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:102
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition: concept.hpp:525
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:386
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:166
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition: concept.hpp:845
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition: concept.hpp:293
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:398
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:669
constexpr auto assign_char_strictly_to
Assign a character to an alphabet object, throw if the character is not valid.
Definition: concept.hpp:732
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:154
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: aligned_sequence_concept.hpp:29
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition: concept.hpp:48
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.