16 #include <seqan3/alphabet/detail/convert.hpp> 28 template <
typename derived_type, auto size>
66 template <
typename other_aa_type>
75 static_cast<derived_type &
>(*this) =
76 detail::convert_through_char_representation<derived_type, other_aa_type>[
to_rank(other)];
99 return valid_char_table[
static_cast<uint8_t
>(c)];
112 for (uint8_t c : derived_type::rank_to_char)
detail::min_viable_uint_t< size - 1 > rank_type
The type of the alphabet when represented as a number (e.g. via to_rank()).
Definition: alphabet_base.hpp:63
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:103
The main SeqAn3 namespace.
constexpr aminoacid_base(other_aa_type const &other) noexcept
Allow explicit construction from any other aminoacid type and convert via the character representatio...
Definition: aminoacid_base.hpp:72
A concept that indicates whether an alphabet represents amino acids.Since an amino acid alphabet has ...
Provides seqan3::alphabet_base.
static constexpr bool char_is_valid(char_type const c) noexcept
Validate whether a character value has a one-to-one mapping to an alphabet value. ...
Definition: aminoacid_base.hpp:97
static detail::min_viable_uint_t< size > constexpr alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:175
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:117
A CRTP-base that refines seqan3::alphabet_base and is used by the amino acids.
Definition: aminoacid_base.hpp:29
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:52
Provides seqan3::AminoacidAlphabet.
The concept std::Same<T, U> is satisfied if and only if T and U denote the same type.
std::conditional_t< std::Same< char, void >, char, char > char_type
The char representation; conditional needed to make semi alphabet definitions legal.
Definition: alphabet_base.hpp:61
constexpr char_type to_lower(char_type const c) noexcept
Converts 'A'-'Z' to 'a'-'z' respectively; other characters are returned as is.
Definition: transform.hpp:82