30template <
typename derived_type, auto size>
72 template <typename other_aa_type>
77 if constexpr (is_constexpr_default_constructible_v<other_aa_type>
78 && detail::writable_constexpr_alphabet<other_aa_type>)
81 detail::convert_through_char_representation<other_aa_type, derived_type>[
seqan3::to_rank(other)];
125 for (
size_t rank = 0u;
rank < derived_type::alphabet_size; ++
rank)
127 uint8_t c = derived_type::rank_to_char(
rank);
Provides seqan3::aminoacid_alphabet.
Provides seqan3::detail::convert_through_char_representation.
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:57
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:137
static constexpr detail::min_viable_uint_t< size > alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:199
rank_type rank
The value of the alphabet letter is stored as the rank.
Definition: alphabet_base.hpp:261
A CRTP-base that refines seqan3::alphabet_base and is used by the amino acids.
Definition: aminoacid_base.hpp:32
static constexpr std::array< bool, 256 > valid_char_table
Implementation of seqan3::aminoacid_base::char_is_valid().
Definition: aminoacid_base.hpp:118
friend derived_type
Befriend the derived class so it can instantiate.
Definition: aminoacid_base.hpp:53
constexpr aminoacid_base() noexcept=default
Defaulted.
friend base_t
Befriend the base class.
Definition: aminoacid_base.hpp:38
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:109
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition: alphabet/concept.hpp:524
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: alphabet/concept.hpp:386
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: alphabet/concept.hpp:155
A concept that indicates whether an alphabet represents amino acids.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
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:83
SeqAn specific customisations in the standard namespace.
This is an empty base class that can be inherited by types that shall model seqan3::aminoacid_alphabe...
Definition: alphabet/aminoacid/concept.hpp:35