A CRTP-base that refines seqan3::alphabet_base and is used by the quality alphabets. More...
#include <seqan3/alphabet/quality/quality_base.hpp>
Public Types | |
using | char_type = char_t |
The type of the alphabet when converted to char (e.g. via to_char()). | |
using | rank_type = detail::min_viable_uint_t< size - 1 > |
The type of the alphabet when represented as a number (e.g. via to_rank()). | |
Member types | |
using | phred_type = int8_t |
The integer representation of a quality score assignable with =operator. | |
Public Member Functions | |
Read functions | |
constexpr char_type | to_char () const noexcept |
Return the letter as a character of char_type. More... | |
constexpr phred_type | to_phred () const noexcept |
Return the alphabet's value in phred representation. | |
Write functions | |
constexpr derived_type & | assign_phred (phred_type const p) noexcept |
Assign from the numeric phred value. More... | |
Read functions | |
constexpr rank_type | to_rank () const noexcept |
Return the letter's numeric value (rank in the alphabet). More... | |
Write functions | |
constexpr derived_type & | assign_char (std::conditional_t< std::Same< char_type, void >, char, char_type > const c) noexcept |
Assign from a character. More... | |
constexpr derived_type & | assign_rank (rank_type const c) noexcept |
Assign from a numeric value. More... | |
Static Public Attributes | |
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. | |
Static Protected Attributes | |
static std::array< rank_type, 256 > constexpr | char_to_rank |
Char to rank conversion table. More... | |
static std::array< rank_type, 256 > constexpr | phred_to_rank |
Phred to rank conversion table. More... | |
Constructors, destructor and assignment | |
template<typename other_qual_type > | |
constexpr | quality_base (other_qual_type const &other) noexcept |
Allow explicit construction from any other quality type by means of the phred representation. | |
A CRTP-base that refines seqan3::alphabet_base and is used by the quality alphabets.
derived_type | The CRTP parameter type. |
size | The size of the alphabet. |
|
inlinenoexceptinherited |
Assign from a character.
Satisfies the seqan3::alphabet_concept::assign_char() requirement via the seqan3::assign_char() wrapper.
Constant.
Guaranteed not to throw.
|
inlinenoexcept |
Assign from the numeric phred value.
Satisfies the seqan3::quality_concept::assign_phred() requirement via the seqan3::assign_rank() wrapper.
Constant.
|
inlinenoexceptinherited |
Assign from a numeric value.
Satisfies the seqan3::semi_alphabet_concept::assign_rank() requirement via the seqan3::assign_rank() wrapper.
Constant.
Guaranteed not to throw.
|
inlinenoexcept |
Return the letter as a character of char_type.
Satisfies the seqan3::alphabet_concept::to_char() requirement via the seqan3::to_char() wrapper.
Constant.
Guaranteed not to throw.
|
inlinenoexceptinherited |
Return the letter's numeric value (rank in the alphabet).
Satisfies the seqan3::semi_alphabet_concept::to_rank() requirement via the to_rank() wrapper.
Constant.
Guaranteed not to throw.
|
staticprotected |
Char to rank conversion table.
|
staticprotected |
Phred to rank conversion table.