54template <
typename derived_type, writable_semialphabet alphabet_type>
55 requires std::regular<alphabet_type>
59 alphabet_base<derived_type,
60 alphabet_size<alphabet_type>,
61 detail::valid_template_spec_or_t<void, alphabet_char_t, alphabet_type>>>
69 alphabet_size<alphabet_type>,
94 requires
std::is_class_v<alphabet_type>
100 requires (!std::is_class_v<alphabet_type>)
109 if constexpr (std::is_class_v<alphabet_type>)
119 template <
typename indirect_assignable_type>
173 constexpr operator alphabet_type() const noexcept
175 if constexpr (std::is_class_v<alphabet_type>)
173 constexpr operator alphabet_type() const noexcept {
…}
196 template <
typename other_t>
197 requires (!std::is_class_v<alphabet_type>) && std::convertible_to<alphabet_type, other_t>
198 constexpr operator other_t()
const noexcept
200 return operator alphabet_type();
198 constexpr operator other_t()
const noexcept {
…}
234 return char_is_valid_for<alphabet_type>(c);
246 template <
typename t>
248 !std::is_same_v<derived_type, t> && detail::weakly_equality_comparable_with<alphabet_type, t>;
252 template <
typename t>
256 return (lhs.operator alphabet_type() == rhs);
260 template <
typename t>
261 friend constexpr auto
268 template <
typename t>
272 return !(lhs == rhs);
276 template <
typename t>
277 friend constexpr auto
Provides alphabet helper concepts.
Provides seqan3::nucleotide_alphabet.
Quality alphabet concept.
Provides seqan3::alphabet_base.
Provides various type traits on generic types.
A CRTP-base that makes defining a custom alphabet easier.
Definition alphabet_base.hpp:54
A CRTP-base that eases the definition of proxy types returned in place of regular alphabets.
Definition alphabet_proxy.hpp:62
friend constexpr auto operator!=(derived_type const lhs, t const rhs) noexcept -> std::enable_if_t< is_alphabet_comparable_with< t >, bool >
Allow (in-)equality comparison with types that the emulated type is comparable with.
Definition alphabet_proxy.hpp:269
detail::valid_template_spec_or_t< int8_t, alphabet_phred_t, alphabet_type > phred_type
The type of the Phred score.
Definition alphabet_proxy.hpp:79
friend base_t
Befriend the base type.
Definition alphabet_proxy.hpp:73
constexpr derived_type & assign_char(char_type const c) noexcept
Assigns a character.
Definition alphabet_proxy.hpp:150
constexpr derived_type & assign_rank(alphabet_rank_t< alphabet_type > const r) noexcept
Assigns a rank.
Definition alphabet_proxy.hpp:142
static constexpr auto alphabet_size
The alphabet size.
Definition alphabet_proxy.hpp:134
constexpr derived_type & assign_phred(phred_type const c) noexcept
Assigns a Phred score.
Definition alphabet_proxy.hpp:159
detail::valid_template_spec_or_t< char, alphabet_char_t, alphabet_type > char_type
The type of the alphabet character.
Definition alphabet_proxy.hpp:76
friend constexpr auto operator!=(t const lhs, derived_type const rhs) noexcept -> std::enable_if_t< is_alphabet_comparable_with< t >, bool >
Allow (in-)equality comparison with types that the emulated type is comparable with.
Definition alphabet_proxy.hpp:278
friend constexpr auto operator==(t const lhs, derived_type const rhs) noexcept -> std::enable_if_t< is_alphabet_comparable_with< t >, bool >
Allow (in-)equality comparison with types that the emulated type is comparable with.
Definition alphabet_proxy.hpp:262
friend constexpr auto operator==(derived_type const lhs, t const rhs) noexcept -> std::enable_if_t< is_alphabet_comparable_with< t >, bool >
Allow (in-)equality comparison with types that the emulated type is comparable with.
Definition alphabet_proxy.hpp:253
friend derived_type
Befriend the derived type so it can instantiate.
Definition alphabet_proxy.hpp:130
constexpr alphabet_proxy(alphabet_type const a) noexcept
Construction from the emulated type.
Definition alphabet_proxy.hpp:99
constexpr alphabet_type complement() const noexcept
Returns the complement.
Definition alphabet_proxy.hpp:224
constexpr auto to_char() const noexcept
Returns the character.
Definition alphabet_proxy.hpp:210
constexpr auto to_phred() const noexcept
Returns the Phred score.
Definition alphabet_proxy.hpp:217
constexpr auto to_rank() const noexcept
Returns the rank.
Definition alphabet_proxy.hpp:204
static constexpr bool char_is_valid(char_type const c) noexcept
Delegate to the emulated type's validator.
Definition alphabet_proxy.hpp:231
static constexpr bool is_alphabet_comparable_with
work around a gcc bug that disables short-circuiting of operator&& in an enable_if_t of a friend func...
Definition alphabet_proxy.hpp:247
constexpr derived_type & operator=(indirect_assignable_type const &c) noexcept
Assignment from any type that the emulated type is assignable from.
Definition alphabet_proxy.hpp:120
constexpr derived_type & operator=(alphabet_type const &c) noexcept
Assignment from the emulated type. This function triggers the specialisation in the derived_type.
Definition alphabet_proxy.hpp:107
constexpr alphabet_proxy & operator=(alphabet_proxy const &)=default
Defaulted.
constexpr alphabet_proxy() noexcept=default
Defaulted.
constexpr auto complement
Return the complement of a nucleotide object.
Definition alphabet/nucleotide/concept.hpp:102
constexpr auto to_phred
The public getter function for the Phred representation of a quality score.
Definition alphabet/quality/concept.hpp:97
constexpr auto assign_phred_to
Assign a Phred score to a quality alphabet object.
Definition alphabet/quality/concept.hpp:225
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:517
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:381
decltype(seqan3::to_rank(std::declval< semi_alphabet_type >())) alphabet_rank_t
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank....
Definition alphabet/concept.hpp:164
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition alphabet/concept.hpp:288
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition alphabet/concept.hpp:152
typename valid_template_spec_or< fallback_t, templ_t, spec_t... >::type valid_template_spec_or_t
Helper for seqan3::detail::valid_template_spec_or (transformation_trait shortcut).
Definition template_inspection.hpp:213
The generic alphabet concept that covers most data types used in ranges.
A concept that indicates whether an alphabet represents nucleotides.
A concept that indicates whether an alphabet represents quality scores.
Resolves to std::is_assignable_v<t>.
Refines seqan3::alphabet and adds assignability.
A concept that indicates whether a writable alphabet represents quality scores.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
SeqAn specific customisations in the standard namespace.
Provides type traits for working with templates.
Provides concepts that do not have equivalents in C++20.