17#include <bio/alphabet/detail/to_lower.hpp>
40template <writable_alphabet sequence_alphabet_t>
41 requires std::regular<sequence_alphabet_t>
42class masked :
public tuple_base<masked<sequence_alphabet_t>, sequence_alphabet_t, mask>
113 for (
size_t i = 0; i < meta::detail::size_in_values_v<char_type>; ++i)
129template <
typename sequence_alphabet_type>
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: base.hpp:168
static constexpr size_t alphabet_size
The size of the alphabet, i.e. the number of different values it can take.
Definition: base.hpp:177
meta::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: base.hpp:65
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: base.hpp:124
Implementation of a masked semialphabet to be used for tuple composites..
Definition: mask.hpp:37
A template for composite alphabets that differentiate between upper and lower case characters....
Definition: masked.hpp:43
static constexpr std::array< rank_type, meta::detail::size_in_values_v< char_type > > char_to_rank
Char to rank conversion table.
Definition: masked.hpp:109
constexpr masked(masked &&) noexcept=default
Defaulted.
char_t< sequence_alphabet_type > char_type
Equals the char_type of sequence_alphabet_type.
Definition: masked.hpp:53
sequence_alphabet_t sequence_alphabet_type
First template parameter as member type.
Definition: masked.hpp:50
static constexpr std::array< char_type, alphabet_size > rank_to_char
Rank to char conversion table.
Definition: masked.hpp:95
constexpr masked(masked const &)=default
Defaulted.
constexpr masked()=default
Defaulted.
masked(sequence_alphabet_type &&, mask const &) -> masked< std::decay_t< sequence_alphabet_type > >
Type deduction guide enables usage of masked without specifying template args.
constexpr masked & assign_char(char_type const c) noexcept
Assign from a character.
Definition: masked.hpp:78
constexpr char_type to_char() const noexcept
Return a character.
Definition: masked.hpp:90
The CRTP base for a combined alphabet that contains multiple values of different alphabets at the sam...
Definition: tuple_base.hpp:96
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:192
constexpr auto assign_char_to
Assign a char to an alphabet object.
Definition: concept.hpp:260
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:70
decltype(bio::alphabet::to_char(std::declval< alphabet_type const >())) char_t
The char_type of the alphabet; defined as the return type of bio::alphabet::to_char.
Definition: concept.hpp:212
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition: concept.hpp:138
Create a mask composite which can be applied with another alphabet.
The alphabet module's namespace.
Definition: aa10li.hpp:23
Provides bio::alphabet::tuple_base.