Specialisation of seqan3::alphabet_base for alphabets of size 1. More...
#include <seqan3/alphabet/alphabet_base.hpp>
Public Member Functions | |
Constructors, destructor and assignment | |
constexpr | alphabet_base () noexcept=default |
Defaulted. | |
constexpr | alphabet_base (alphabet_base const &) noexcept=default |
Defaulted. | |
constexpr | alphabet_base (alphabet_base &&) noexcept=default |
Defaulted. | |
constexpr alphabet_base & | operator= (alphabet_base const &) noexcept=default |
Defaulted. | |
constexpr alphabet_base & | operator= (alphabet_base &&) noexcept=default |
Defaulted. | |
~alphabet_base () noexcept=default | |
Read functions | |
constexpr char_type | to_char () const noexcept |
Return the letter as a character of char_type. | |
constexpr rank_type | to_rank () const noexcept |
Return the letter's numeric value (rank in the alphabet). | |
Write functions | |
constexpr derived_type & | assign_char (char_type const) noexcept |
Assign from a character, implicitly converts invalid characters. | |
constexpr derived_type & | assign_rank (rank_type const) noexcept |
Assign from a numeric value. | |
Static Public Attributes | |
static constexpr bool | alphabet_size = 1 |
The size of the alphabet, i.e. the number of different values it can take. | |
Protected Types | |
Member types | |
using | char_type = std::conditional_t< std::same_as< char_t, void >, char, char_t > |
The char representation; conditional needed to make semi alphabet definitions legal. | |
using | rank_type = bool |
The type of the alphabet when represented as a number (e.g. via to_rank()). | |
Friends | |
Comparison operators | |
constexpr friend bool | operator== (derived_type const, derived_type const) noexcept |
Letters are always equal. | |
constexpr friend bool | operator!= (derived_type const, derived_type const) noexcept |
Letters are never unequal. | |
constexpr friend bool | operator< (derived_type const, derived_type const) noexcept |
One letter cannot be smaller than another. | |
constexpr friend bool | operator> (derived_type const, derived_type const) noexcept |
One letter cannot be bigger than another. | |
constexpr friend bool | operator<= (derived_type const, derived_type const) noexcept |
Letters are always equal. | |
constexpr friend bool | operator>= (derived_type const, derived_type const) noexcept |
Letters are always equal. | |
Specialisation of seqan3::alphabet_base for alphabets of size 1.
derived_type | The CRTP parameter type. |
char_t | The character type (always set to char for alphabets of size 1 and to void for semi alphabets of size 1). |
This specialisation holds no member variable and many functions are NO-OPs because if the alphabet has only one valid value there is no state that can be changed.
|
defaultnoexcept |
Defaulted.