SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
seqan3::custom Namespace Reference

A namespace for third party and standard library specialisations of SeqAn customisation points. More...

Functions

Free function wrappers for the char alphabet adaptation

For char, char16_t and char32_t do conversion to/from uint types.

template<typename char_type >
constexpr auto alphabet_size (char_type const &chr) noexcept
 Return the number of values the char type can take. More...
 
template<typename char_type >
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). More...
 
template<typename char_type >
constexpr auto to_rank (char_type const chr) noexcept
 Convert char to rank by casting to an unsigned integral type of same size. More...
 
template<typename char_type >
constexpr char_type & assign_char_to (char_type const chr2, char_type &chr) noexcept
 Assign a char to the char type (same as calling =). More...
 
template<typename char_type >
constexpr char_type & assign_rank_to (decltype(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. More...
 
Free function wrappers for the uint alphabet adaptation

For uint8_t, uint16_t and uint32_t do conversion to/from char types.

template<typename uint_type >
constexpr auto alphabet_size (uint_type const &intgr) noexcept
 Return the number of values the uint type can take. More...
 
template<typename uint_type >
constexpr auto to_char (uint_type const intgr) noexcept
 Converting uint to char casts to a character type of same size. More...
 
template<typename uint_type >
constexpr uint_type to_rank (uint_type const intgr) noexcept
 Converting uint to rank is a no-op (it will just return the value you pass in). More...
 
template<typename uint_type >
constexpr uint_type & assign_char_to (decltype(to_char(uint_type{})) const chr, uint_type &intgr) noexcept
 Assign from a character type via implicit or explicit cast. More...
 
template<typename uint_type >
constexpr uint_type & assign_rank_to (uint_type const intgr2, uint_type &intgr) noexcept
 Assign a rank to to the uint (same as calling =). More...
 

Detailed Description

A namespace for third party and standard library specialisations of SeqAn customisation points.

See also
Customisation

Function Documentation

◆ alphabet_size() [1/2]

template<typename uint_type >
constexpr auto seqan3::custom::alphabet_size ( uint_type const &  intgr)
noexcept

Return the number of values the uint type can take.

Template Parameters
uint_typeOne of uint8_t, uint16_t or uint32_t.
Parameters
intgrThe parameter's actual value is ignored.
Returns
The respective size (e.g. 256 for uint8_t).

◆ alphabet_size() [2/2]

template<typename char_type >
constexpr auto seqan3::custom::alphabet_size ( char_type const &  chr)
noexcept

Return the number of values the char type can take.

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.
Parameters
chrThe parameters actual value is ignored.
Returns
The respective sizes (e.g. 256 for char).

◆ assign_char_to() [1/2]

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

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

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.
Parameters
chrThe alphabet letter that you wish to assign to.
chr2The char value you wish to assign.
Returns
A reference to the alphabet letter you passed in.

◆ assign_char_to() [2/2]

template<typename uint_type >
constexpr uint_type& seqan3::custom::assign_char_to ( decltype(to_char(uint_type{})) const  chr,
uint_type &  intgr 
)
noexcept

Assign from a character type via implicit or explicit cast.

Template Parameters
uint_typeOne of uint8_t, uint16_t or uint32_t.
Parameters
intgrThe alphabet letter that you wish to assign to.
chrThe char value you wish to assign.
Returns
A reference to the alphabet letter you passed in.

◆ assign_rank_to() [1/2]

template<typename char_type >
constexpr char_type& seqan3::custom::assign_rank_to ( decltype(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.

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.
Parameters
chrThe alphabet letter that you wish to assign to.
rankThe rank value you wish to assign.
Returns
A reference to the alphabet letter you passed in.

◆ assign_rank_to() [2/2]

template<typename uint_type >
constexpr uint_type& seqan3::custom::assign_rank_to ( uint_type const  intgr2,
uint_type &  intgr 
)
noexcept

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

Template Parameters
uint_typeOne of uint8_t, uint16_t or uint32_t.
Parameters
intgrThe alphabet letter that you wish to assign to.
intgr2The rank value you wish to assign.
Returns
A reference to the alphabet letter you passed in.

◆ to_char() [1/2]

template<typename uint_type >
constexpr auto seqan3::custom::to_char ( uint_type const  intgr)
noexcept

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

Template Parameters
uint_typeOne of uint8_t, uint16_t or uint32_t.
Parameters
intgrThe alphabet letter that you wish to convert to char.
Returns
The letter's value in the alphabet's rank type (usually uint).

◆ to_char() [2/2]

template<typename char_type >
constexpr char_type seqan3::custom::to_char ( char_type const  chr)
noexcept

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

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.
Parameters
chrThe alphabet letter that you wish to convert to char (no-op).
Returns
chr.

◆ to_rank() [1/2]

template<typename char_type >
constexpr auto seqan3::custom::to_rank ( char_type const  chr)
noexcept

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

Template Parameters
char_typeOne of char, char16_t, char32_t or wchar_t.
Parameters
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).

◆ to_rank() [2/2]

template<typename uint_type >
constexpr uint_type seqan3::custom::to_rank ( uint_type const  intgr)
noexcept

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

Template Parameters
uint_typeOne of uint8_t, uint16_t or uint32_t.
Parameters
intgrThe alphabet letter that you wish to convert to rank.
Returns
intgr.