Adaptation

Meta-header for the adaptation submodule; includes all headers from alphabet/adaptation/.

Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

Provides alphabet adaptations for standard char types.

This file provides function and metafunction overloads so that the following types fulfil the seqan3::alphabet_concept:

  • char
  • char16_t
  • char32_t
Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

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 signed char and unsigned char are absent from the list, because of their type ambiguity with int8_t and uint8_t.
  • Note that wchar_t is absent from the list for its notorious brokenness (different sizes and signedness between platforms); use char16_t or char32_t instead.
Attention
Please be aware that if you also include alphabet/concept.hpp and/or alphabet/adaptation/concept.hpp, you need to do so after including this file, not before.

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

template <typename char_type>
template<>
struct alphabet_size<char_type>
#include <alphabet/adaptation/char.hpp>

Specialisation of seqan3::alphabet_size that delegates for char types.

See
seqan3::alphabet_size_v
Template Parameters
  • char_type: One of char, char16_t or char32_t.

Public Types

using seqan3::alphabet_size< char_type >::type = detail::min_viable_uint_t<static_cast<uint64_t>(std::numeric_limits<char_type>::max()) + 1 - std::numeric_limits<char_type>::lowest()>

Smallest unsigned integral type that can hold value;.

Public Static Attributes

constexpr type value = static_cast<type>(std::numeric_limits<char_type>::max()) + 1 - std::numeric_limits<char_type>::lowest()

The alphabet’s size.

template <typename char_type>
template<>
struct underlying_char<char_type>
#include <alphabet/adaptation/char.hpp>

Specialisation of seqan3::underlying_char for char types.

See
seqan3::underlying_char_t
Template Parameters
  • char_type: One of char, char16_t or char32_t.

Public Types

template<>
using type = char_type

The same type as char_type.

template <typename char_type>
template<>
struct underlying_rank<char_type>
#include <alphabet/adaptation/char.hpp>

Specialisation of seqan3::underlying_rank for char types.

See
seqan3::underlying_rank_t
Template Parameters
  • char_type: One of char, char16_t or char32_t.

Public Types

template<>
using type = meta::at<detail::char_adaptations_rank_types, meta::find_index<detail::char_adaptations, char_type>>

An unsigned integer type of the same size as char_type.

Provides seqan3::char_adaptation_concept and seqan3::uint_adaptation_concept.

Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

Provides alphabet adaptations for standard uint types.

This file provides function and metafunction overloads so that the following types fulfil the seqan3::alphabet_concept:

  • uint8_t
  • uint16_t
  • uint32_t
Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>

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 corresponding character type.
Attention
Please be aware that if you also include alphabet/concept.hpp and/or alphabet/adaptation/concept.hpp, you need to do so after including this file, not before.

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

template <typename uint_type>
template<>
struct alphabet_size<uint_type>
#include <alphabet/adaptation/uint.hpp>

Specialisation of seqan3::alphabet_size that delegates for uint types.

See
seqan3::alphabet_size_v
Template Parameters
  • uint_type: One of uint8_t, uint16_t or uint32_t.

Public Types

using seqan3::alphabet_size< uint_type >::type = detail::min_viable_uint_t<static_cast<uint64_t>(std::numeric_limits<uint_type>::max()) + 1 - std::numeric_limits<uint_type>::lowest()>

Smallest unsigned integral type that can hold value;.

Public Static Attributes

constexpr type value = static_cast<type>(std::numeric_limits<uint_type>::max()) + 1 - std::numeric_limits<uint_type>::lowest()

The alphabet’s size.

template <typename uint_type>
template<>
struct underlying_char<uint_type>
#include <alphabet/adaptation/uint.hpp>

Specialisation of seqan3::underlying_char for uint types.

See
seqan3::underlying_char_t
Template Parameters
  • uint_type: One of uint8_t, uint16_t or uint32_t.

Public Types

template<>
using type = meta::at<detail::uint_adaptations_char_types, meta::find_index<detail::uint_adaptations, uint_type>>

The character type of the same size as uint_type.

template <typename uint_type>
template<>
struct underlying_rank<uint_type>
#include <alphabet/adaptation/uint.hpp>

Specialisation of seqan3::underlying_rank for uint types.

See
seqan3::underlying_rank_t
Template Parameters
  • uint_type: One of uint8_t, uint16_t or uint32_t.

Public Types

template<>
using type = uint_type

The same as uint_type.