SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::custom::alphabet< char_type > Struct Template Reference

Alphabet specific customisations for builtin char types. More...

#include <seqan3/alphabet/adaptation/char.hpp>

Static Public Member Functions

static constexpr char_type & assign_char_to (char_type const chr2, char_type &chr) noexcept
 Assign a char to the char type (same as calling =).
 
static constexpr char_type & assign_rank_to (decltype(alphabet::to_rank(char_type{})) const rank, char_type &chr) noexcept
 Assigning a rank to a char is the same as assigning it a numeric value.
 
static constexpr char_type to_char (char_type const chr) noexcept
 Converting char to char is no-op (it will just return the value you pass in).
 
static constexpr auto to_rank (char_type const chr) noexcept
 Convert char to rank by casting to an unsigned integral type of same size.
 

Static Public Attributes

static constexpr auto alphabet_size
 The number of values the char type can take (e.g. 256 for char).
 

Detailed Description

template<typename char_type>
requires detail::is_char_adaptation_v<char_type>
struct seqan3::custom::alphabet< char_type >

Alphabet specific customisations for builtin char types.

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.

This entity is stable. Since version 3.1.

Member Function Documentation

◆ assign_char_to()

template<typename char_type >
static constexpr char_type & seqan3::custom::alphabet< char_type >::assign_char_to ( char_type const  chr2,
char_type &  chr 
)
inlinestaticconstexprnoexcept

Assign a char to the char type (same as calling =).

Parameters
[in]chr2The char value you wish to assign.
[in,out]chrThe alphabet letter that you wish to assign to.
Returns
A reference to the alphabet letter you passed in.

This entity is stable. Since version 3.1.

◆ assign_rank_to()

template<typename char_type >
static constexpr char_type & seqan3::custom::alphabet< char_type >::assign_rank_to ( decltype(alphabet< char_type >::to_rank(char_type{})) const  rank,
char_type &  chr 
)
inlinestaticconstexprnoexcept

Assigning a rank to a char is the same as assigning it a numeric value.

Parameters
[in]rankThe rank value you wish to assign.
[in,out]chrThe alphabet letter that you wish to assign to.
Returns
A reference to the alphabet letter you passed in.

This entity is stable. Since version 3.1.

◆ to_char()

template<typename char_type >
static constexpr char_type seqan3::custom::alphabet< char_type >::to_char ( char_type const  chr)
inlinestaticconstexprnoexcept

Converting char to char is no-op (it will just return the value you pass in).

Parameters
[in]chrThe alphabet letter that you wish to convert to char (no-op).
Returns
chr.

This entity is stable. Since version 3.1.

◆ to_rank()

template<typename char_type >
static constexpr auto seqan3::custom::alphabet< char_type >::to_rank ( char_type const  chr)
inlinestaticconstexprnoexcept

Convert char to rank by casting to an unsigned integral type of same size.

Parameters
[in]chrThe alphabet letter that you wish to convert to rank.
Returns
The letter's value in the alphabet's rank type (usually a uint*_t).

This entity is stable. Since version 3.1.

Member Data Documentation

◆ alphabet_size

template<typename char_type >
constexpr auto seqan3::custom::alphabet< char_type >::alphabet_size
staticconstexpr
Initial value:
=
detail::min_viable_uint_t<detail::size_in_values_v<char_type>>{detail::size_in_values_v<char_type>}

The number of values the char type can take (e.g. 256 for char).

This entity is stable. Since version 3.1.


The documentation for this struct was generated from the following file:
Hide me