SeqAn3
The Modern C++ library for sequence analysis.
seqan3::alphabet_base< derived_type, 1ul, char_t > Class Template Reference

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_baseoperator= (alphabet_base const &) noexcept=default
 Defaulted.
 
constexpr alphabet_baseoperator= (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 bool operator== (derived_type const, derived_type const) noexcept
 Letters are always equal.
 
constexpr bool operator!= (derived_type const, derived_type const) noexcept
 Letters are never unequal.
 
constexpr bool operator< (derived_type const, derived_type const) noexcept
 One letter cannot be smaller than another.
 
constexpr bool operator> (derived_type const, derived_type const) noexcept
 One letter cannot be bigger than another.
 
constexpr bool operator<= (derived_type const, derived_type const) noexcept
 Letters are always equal.
 
constexpr bool operator>= (derived_type const, derived_type const) noexcept
 Letters are always equal.
 

Detailed Description

template<typename derived_type, typename char_t>
class seqan3::alphabet_base< derived_type, 1ul, char_t >

Specialisation of seqan3::alphabet_base for alphabets of size 1.

Template Parameters
derived_typeThe CRTP parameter type.
char_tThe 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.

Constructor & Destructor Documentation

◆ ~alphabet_base()

template<typename derived_type , typename char_t >
seqan3::alphabet_base< derived_type, 1ul, char_t >::~alphabet_base ( )
defaultnoexcept

Defaulted.


The documentation for this class was generated from the following file: