SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
seqan3::custom::alphabet< uint_type > Struct Template Reference

Alphabet specific customisations for unsigned integral types. More...

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

Static Public Member Functions

static constexpr uint_type & assign_char_to (decltype(to_char(uint_type{})) const chr, uint_type &uint_v) noexcept
 Assign from a character type via implicit or explicit cast. More...
 
static constexpr uint_type & assign_rank_to (uint_type const uint2_v, uint_type &uint_v) noexcept
 Assign a rank to the uint (same as calling =). More...
 
static constexpr auto to_char (uint_type const uint_v) noexcept
 Converting uint to char casts to a character type of same size. More...
 
static constexpr uint_type to_rank (uint_type const uint_v) noexcept
 Converting uint to rank is a no-op (it will just return the value you pass in). More...
 

Static Public Attributes

static constexpr auto alphabet_size
 Return the number of values the uint type can take (e.g. 256 for uint8_t). More...
 

Detailed Description

template<typename uint_type>
struct seqan3::custom::alphabet< uint_type >

Alphabet specific customisations for unsigned integral types.

Template Parameters
uint_typeAny of uint8_t, uint16_t and uint32_t.

This entity is stable. Since version 3.1.

Member Function Documentation

◆ assign_char_to()

template<typename uint_type >
static constexpr uint_type & seqan3::custom::alphabet< uint_type >::assign_char_to ( decltype(to_char(uint_type{})) const  chr,
uint_type &  uint_v 
)
inlinestaticconstexprnoexcept

Assign from a character type via implicit or explicit cast.

Parameters
[in]chrThe char value you wish to assign.
[in,out]uint_vThe 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 uint_type >
static constexpr uint_type & seqan3::custom::alphabet< uint_type >::assign_rank_to ( uint_type const  uint2_v,
uint_type &  uint_v 
)
inlinestaticconstexprnoexcept

Assign a rank to the uint (same as calling =).

Parameters
[in]uint2_vThe rank value you wish to assign.
[in,out]uint_vThe 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 uint_type >
static constexpr auto seqan3::custom::alphabet< uint_type >::to_char ( uint_type const  uint_v)
inlinestaticconstexprnoexcept

Converting uint to char casts to a character type of same size.

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

This entity is stable. Since version 3.1.

◆ to_rank()

template<typename uint_type >
static constexpr uint_type seqan3::custom::alphabet< uint_type >::to_rank ( uint_type const  uint_v)
inlinestaticconstexprnoexcept

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

Parameters
[in]uint_vThe alphabet letter that you wish to convert to rank.
Returns
uint_v.

This entity is stable. Since version 3.1.

Member Data Documentation

◆ alphabet_size

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

Return the number of values the uint type can take (e.g. 256 for uint8_t).

This entity is stable. Since version 3.1.


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