Loading...
Searching...
No Matches
seqan3::custom::alphabet< uint_type > Struct Template Reference
Alphabet » Adaptation

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

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

Inheritance diagram for seqan3::custom::alphabet< uint_type >:
[legend]

## 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.
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 =).
static constexpr auto | to_char (uint_type const uint_v) noexcept
| Converting uint to char casts to a character type of same size.
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).

## Static Public Attributes

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

## Detailed Description

template<typename uint_type>
requires seqan3::detail::is_uint_adaptation_v<uint_type>
struct seqan3::custom::alphabet< uint_type >

Alphabet specific customisations for unsigned integral types.

Template Parameters

  uint_type | Any 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>

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

inline static constexpr noexcept

Assign from a character type via implicit or explicit cast.

Parameters

  [in] | chr | The char value you wish to assign.
  [in,out] | uint_v | The 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>

constexpr uint_type & seqan3::custom::alphabet< uint_type >::assign_rank_to | ( | uint_type const | uint2_v,
|  | uint_type & | uint_v )

inline static constexpr noexcept

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

Parameters

  [in] | uint2_v | The rank value you wish to assign.
  [in,out] | uint_v | The 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>

constexpr auto seqan3::custom::alphabet< uint_type >::to_char | ( | uint_type const | uint_v | ) |

inline static constexpr noexcept

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

Parameters

  [in] | uint_v | The 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>

constexpr uint_type seqan3::custom::alphabet< uint_type >::to_rank | ( | uint_type const | uint_v | ) |

inline static constexpr noexcept

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

Parameters

  [in] | uint_v | The 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>

auto seqan3::custom::alphabet< uint_type >::alphabet_size

static constexpr

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:

- uint.hpp

Hide me