42 template <writable_alphabet sequence_alphabet_t>
43 requires std::regular<sequence_alphabet_t>
44 class masked :
public alphabet_tuple_base<masked<sequence_alphabet_t>, sequence_alphabet_t, mask>
48 using base_t = alphabet_tuple_base<masked<sequence_alphabet_t>, sequence_alphabet_t,
mask>;
61 using char_type = alphabet_char_t<sequence_alphabet_type>;
63 using base_t::alphabet_size;
64 using typename base_t::rank_type;
80 using base_t::operator=;
92 base_t::assign_rank(
char_to_rank[
static_cast<index_t
>(c)]);
117 for (
size_t i = 0; i < alphabet_size; ++i)
119 ret[i] = (i < alphabet_size / 2)
133 for (
size_t i = 0; i < 256; ++i)
147 template <
typename sequence_alphabet_type>
Provides seqan3::alphabet_tuple_base.
Implementation of a masked alphabet to be used for tuple composites.
Definition: mask.hpp:38
Implementation of a masked composite, which extends a given alphabet with a mask.
Definition: masked.hpp:45
static constexpr std::array< rank_type, detail::size_in_values_v< char_type > > char_to_rank
Char to rank conversion table.
Definition: masked.hpp:128
alphabet_char_t< sequence_alphabet_type > char_type
Equals the char_type of sequence_alphabet_type.
Definition: masked.hpp:61
constexpr masked & operator=(masked const &)=default
Defaulted.
static constexpr std::array< char_type, alphabet_size > rank_to_char
Rank to char conversion table.
Definition: masked.hpp:112
~masked()=default
Defaulted.
constexpr masked & operator=(masked &&)=default
Defaulted.
constexpr masked(masked &&)=default
Defaulted.
constexpr masked()=default
Defaulted.
sequence_alphabet_t sequence_alphabet_type
First template parameter as member type.
Definition: masked.hpp:55
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(masked const &)=default
Defaulted.
constexpr masked & assign_char(char_type const c) noexcept
Assign from a character.
Definition: masked.hpp:89
constexpr char_type to_char() const noexcept
Return a character.
Definition: masked.hpp:104
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 assign_rank_to
Assign a rank to an alphabet object.
Definition: alphabet/concept.hpp:293
requires requires
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank....
Definition: alphabet/concept.hpp:164
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: alphabet/concept.hpp:155
constexpr auto is_lower
Checks whether c is a lower case character.
Definition: predicate.hpp:246
Create a mask composite which can be applied with another alphabet.
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
Provides character predicates for tokenisation.