Detail

Provides seqan3::detail::convert_through_char_representation.

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

namespace detail

The internal SeqAn3 namespace.

The contents of this namespace are not visible to consumers of the library and the documentation is only generated for developers.

See
https://github.com/seqan/seqan3/wiki/Documentation

Variables

constexpr std::array<out_t, alphabet_size_v<in_t>> convert_through_char_representation

A precomputed conversion table for two alphabets based on their char representations.

Template Parameters
  • out_t: The type of the output, must satisfy seqan3::alphabet_concept.
  • in_t: The type of the input, must satisfy seqan3::alphabet_concept.

Free function/metafunction wrappers for alphabets with member functions/types.

Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de> This shall not need be included manually, just include alphabet/concept.hpp.

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.

template <typename alphabet_type>
constexpr underlying_rank_t<alphabet_type> to_rank(alphabet_type const alph)

Implementation of seqan3::semi_alphabet_concept::to_rank() that delegates to a member function.

Return
The letter’s value in the alphabet’s rank type (usually a uint*_t).
Template Parameters
  • alphabet_type: Must provide a .to_rank() member function.
Parameters
  • alph: The alphabet letter that you wish to convert to rank.

template <typename alphabet_type>
constexpr alphabet_type &assign_rank(alphabet_type &alph, underlying_rank_t<alphabet_type> const rank)

Implementation of seqan3::semi_alphabet_concept::assign_rank() that delegates to a member function.

Return
A reference to the alphabet letter you passed in.
Template Parameters
Parameters
  • alph: The alphabet letter that you wish to assign to.
  • rank: The rank value you wish to assign.

template <typename alphabet_type>
constexpr alphabet_type &&assign_rank(alphabet_type &&alph, underlying_rank_t<alphabet_type> const rank)

Implementation of seqan3::semi_alphabet_concept::assign_rank() that delegates to a member function.

Use this e.g. to newly create alphabet letters from rank:

auto l = assign_rank(dna5{}, 1);  // l is of type dna5 and == dna5::C
Return
The assignment result as a temporary.
Template Parameters
Parameters
  • alph: An alphabet letter temporary.
  • rank: The rank value you wish to assign.

Helpers for seqan3::alphabet_concept

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

template <typename alphabet_type>
constexpr underlying_char_t<alphabet_type> to_char(alphabet_type const alph)

Implementation of seqan3::alphabet_concept::to_char() that delegates to a member function.

Return
The letter’s value in the alphabet’s rank type (usually char).
Template Parameters
  • alphabet_type: Must provide a .to_char() member function.
Parameters
  • alph: The alphabet letter that you wish to convert to char.

template <typename alphabet_type>
std::ostream &operator<<(std::ostream &os, alphabet_type const alph)

Implementation of seqan3::alphabet_concept::operator<<() that delegates to alph.to_char().

Return
A reference to the output stream.
Template Parameters
  • alphabet_type: Must provide a .to_char() member function.
Parameters
  • os: The output stream you are printing to.
  • alph: The alphabet letter that you wish to print.

template <typename alphabet_type>
constexpr alphabet_type &assign_char(alphabet_type &alph, underlying_char_t<alphabet_type> const chr)

Implementation of seqan3::alphabet_concept::assign_char() that delegates to a member function.

Return
A reference to the alphabet letter you passed in.
Template Parameters
Parameters
  • alph: The alphabet letter that you wish to assign to.
  • chr: The char value you wish to assign.

template <typename alphabet_type>
constexpr alphabet_type &&assign_char(alphabet_type &&alph, underlying_char_t<alphabet_type> const chr)

Implementation of seqan3::alphabet_concept::assign_char() that delegates to a member function.

Use this e.g. to newly create alphabet letters from char:

auto l = assign_char(dna5{}, 'G');  // l is of type dna5
Return
The assignment result as a temporary.
Template Parameters
Parameters
  • alph: An alphabet letter temporary.
  • chr: The char value you wish to assign.

Helpers for seqan3::nucleotide_concept

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

template <typename nucleotide_type>
constexpr nucleotide_type complement(nucleotide_type const alph)

Implementation of seqan3::nucleotide_concept::complement() that delegates to a member function.

Return
The letter’s complement, e.g. ‘T’ for ‘A’.
Template Parameters
  • nucleotide_type: Must provide a .complement() member function.
Parameters
  • alph: The alphabet letter for whom you wish to receive the complement.

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 alphabet_type_with_members>
template<>
struct alphabet_size<alphabet_type_with_members>
#include <alphabet/detail/member_exposure.hpp>

Specialisation of seqan3::alphabet_size that delegates to alphabet_type::value_size.

Instead of accessing this struct directly, just use seqan3::alphabet_size_v.

Template Parameters
  • alphabet_type: Must provide a static member variable calles value_size.

Public Static Attributes

constexpr underlying_rank_t<alphabet_type_with_members> value = alphabet_type_with_members::value_size

The size retrieved from the type’s member.

template <typename alphabet_type_with_members>
template<>
struct underlying_char<alphabet_type_with_members>
#include <alphabet/detail/member_exposure.hpp>

Specialisation of seqan3::underlying_char that delegates to typename alphabet_type::char_type.

Template Parameters
  • alphabet_type: Must provide a member type char_type.

Public Types

template<>
using type = typename alphabet_type_with_members::char_type

The forwarded char_type.

template <typename alphabet_type_with_members>
template<>
struct underlying_rank<alphabet_type_with_members>
#include <alphabet/detail/member_exposure.hpp>

Specialisation of seqan3::underlying_rank that delegates to typename alphabet_type::rank_type.

Template Parameters
  • alphabet_type: Must provide a member type rank_type.

Public Types

template<>
using type = typename alphabet_type_with_members::rank_type

The forwarded rank_type.