43 #include <seqan3/alphabet/detail/convert.hpp> 64 template <
typename derived_type, auto size>
97 template <
typename other_nucl_type>
106 static_cast<derived_type &
>(*this) =
107 detail::convert_through_char_representation<derived_type, other_nucl_type>[
to_rank(other)];
133 return derived_type::complement_table[
to_rank()];
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:89
char char_type
The type of the alphabet when converted to char (e.g. via to_char()).
Definition: alphabet_base.hpp:87
constexpr derived_type complement() const noexcept
Return the complement of the letter.
Definition: nucleotide_base.hpp:131
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
constexpr nucleotide_base(other_nucl_type const &other) noexcept
Allow explicit construction from any other nucleotide type and convert via the character representati...
Definition: nucleotide_base.hpp:103
static detail::min_viable_uint_t< size > constexpr value_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: alphabet_base.hpp:198
Provides seqan3::nucleotide_concept.
Provides seqan3::alphabet_base.
The concept std::Same<T, U> is satisfied if and only if T and U denote the same type.
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:142
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:77
A CRTP-base that refines seqan3::alphabet_base and is used by the nucleotides.
Definition: nucleotide_base.hpp:65
constexpr underlying_rank_t< alphabet_type > to_rank(alphabet_type const alph) requires requires(alphabet_type alph)
Implementation of seqan3::semi_alphabet_concept::to_rank() that delegates to a member function...
Definition: member_exposure.hpp:97
A concept that indicates whether an alphabet represents nucleotides.In addition to the requirements f...