SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
semialphabet Interface Reference

The basis for seqan3::alphabet, but requires only rank interface (not char). More...

#include <seqan3/alphabet/concept.hpp>

+ Inheritance diagram for semialphabet:

Related Symbols

(Note that these are not member symbols.)

Generic serialisation functions for all seqan3::semialphabet

All types that satisfy seqan3::semialphabet can be serialised via Cereal.

template<cereal_output_archive archive_t, semialphabet alphabet_t>
alphabet_rank_t< alphabet_t > save_minimal (archive_t const &, alphabet_t const &l)
 Save an alphabet letter to stream.
 
template<cereal_input_archive archive_t, typename wrapped_alphabet_t >
void load_minimal (archive_t const &, wrapped_alphabet_t &&l, alphabet_rank_t< detail::strip_cereal_wrapper_t< wrapped_alphabet_t > > const &r)
 Restore an alphabet letter from a saved rank.
 

Detailed Description

The basis for seqan3::alphabet, but requires only rank interface (not char).

This concept represents the "rank part" of what is considered "an alphabet" in SeqAn. It requires no char representation and corresponding interfaces. It is mostly used internally.

Requirements

  1. t shall model std::totally_ordered ("has all comparison operators")
  2. objects of type t shall be efficiently copyable:
    • t shall model std::copy_constructible and be std::is_nothrow_copy_constructible
    • move construction shall not be more efficient than copy construction; this implies no dynamic memory (de-)allocation [this is a semantic requirement that cannot be checked]
  3. seqan3::alphabet_size needs to be defined for t
  4. seqan3::to_rank needs to be defined for objects of type t

See the documentation pages for the respective requirements. The implications of 2. are that you can always take function arguments of types that model seqan3::semialphabet by value.

It is highly recommended that non-reference types that model this concept, also model:

All alphabets available in SeqAn (with very few exceptions) do so.

Related types

If a given type t models this concept, the following types typically do so, as well:

  • t &
  • t const
  • t const &

This entity is stable. Since version 3.1.

Friends And Related Symbol Documentation

◆ load_minimal()

template<cereal_input_archive archive_t, typename wrapped_alphabet_t >
void load_minimal ( archive_t const &  ,
wrapped_alphabet_t &&  l,
alphabet_rank_t< detail::strip_cereal_wrapper_t< wrapped_alphabet_t > > const &  r 
)
related

Restore an alphabet letter from a saved rank.

Template Parameters
archive_tMust satisfy seqan3::cereal_input_archive.
wrapped_alphabet_tA seqan3::semialphabet after Cereal mangles it up.
Parameters
lThe alphabet letter (cereal wrapped).
rThe assigned value.

Delegates to seqan3::assign_rank.

Attention
These functions are never called directly, see the Alphabet module on how to use serialisation.

◆ save_minimal()

template<cereal_output_archive archive_t, semialphabet alphabet_t>
alphabet_rank_t< alphabet_t > save_minimal ( archive_t const &  ,
alphabet_t const &  l 
)
related

Save an alphabet letter to stream.

Template Parameters
archive_tMust satisfy seqan3::cereal_output_archive.
alphabet_tType of l; must satisfy seqan3::semialphabet.
Parameters
lThe alphabet letter.

Delegates to seqan3::to_rank.

Attention
These functions are never called directly, see the Alphabet module on how to use serialisation.

This entity is stable. Since version 3.1.


The documentation for this interface was generated from the following file:
Hide me