BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
uint.hpp File Reference

Provides alphabet adaptations for standard uint types. More...

+ Include dependency graph for uint.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bio
 The main BioC++ namespace.
 
namespace  bio::alphabet
 The alphabet module's namespace.
 
namespace  bio::alphabet::custom
 A namespace for third party and standard library specialisations of BioC++ customisation points.
 

Functions

Adapt unsigned integral types as semialphabets.

These overloads make uint8_t, uint16_t and uint32_t (but not uint64_t!) satisfy bio::alphabet::semialphabet.

template<alphabet::detail::uint_adaptation uint_type>
constexpr uint_type & bio::alphabet::custom::tag_invoke (assign_rank_to tag, uint_type const intgr2, uint_type &intgr) noexcept
 Assign a rank to to the uint (same as calling =).
 
template<alphabet::detail::uint_adaptation uint_type>
consteval auto bio::alphabet::custom::tag_invoke (size tag, uint_type const) noexcept
 The number of values the uint type can take (e.g. 256 for uint8_t).
 
template<alphabet::detail::uint_adaptation uint_type>
constexpr auto bio::alphabet::custom::tag_invoke (to_rank tag, uint_type const intgr) noexcept
 Converting uint to rank is a no-op (it will just return the value you pass in).
 

Detailed Description

Provides alphabet adaptations for standard uint types.

Author
Hannes Hauswedell <hannes.hauswedell AT decode.is>

This file provides function and type trait overloads so that the following types fulfil the bio::alphabet::semialphabet:

  • uint8_t
  • uint16_t
  • uint32_t

You will likely not use these interfaces directly, they are, however, very helpful for conversions between other alphabets and between other alphabets and characters.

Attention
Note that uint64_t is absent from the list, because there is no type that can hold its alphabet size.