Loading...
Searching...
No Matches
seqan3::gap Class Reference
Alphabet » Gap

The alphabet of a gap character '-'. More...

`#include <seqan3/alphabet/gap/gap.hpp>`

Inheritance diagram for seqan3::gap:
[legend]

## Public Member Functions

Constructors, destructor and assignment
constexpr | gap () noexcept
| Defaulted.
constexpr | gap (gap const &)=default
| Defaulted.
constexpr | gap (gap &&)=default
| Defaulted.
constexpr gap & | operator= (gap const &)=default
| Defaulted.
constexpr gap & | operator= (gap &&)=default
| Defaulted.
| ~gap ()=default
| Defaulted.
Public Member Functions inherited from seqan3::alphabet_base< gap, 1, char >
constexpr | alphabet_base () noexcept=default
| Defaulted.
constexpr | alphabet_base (alphabet_base const &) noexcept=default
| Defaulted.
constexpr | alphabet_base (alphabet_base &&) noexcept=default
| Defaulted.
constexpr alphabet_base & | operator= (alphabet_base const &) noexcept=default
| Defaulted.
constexpr alphabet_base & | operator= (alphabet_base &&) noexcept=default
| Defaulted.
| ~alphabet_base () noexcept=default
| Defaulted.
constexpr char_type | to_char () const noexcept
| Return the letter as a character of char_type.
constexpr rank_type | to_rank () const noexcept
| Return the letter's numeric value (rank in the alphabet).
constexpr gap & | assign_char (char_type const chr) noexcept
| Assign from a character, implicitly converts invalid characters.
constexpr gap & | assign_rank (rank_type const c) noexcept
| Assign from a numeric value.

## Additional Inherited Members

Static Public Attributes inherited from seqan3::alphabet_base< gap, 1, char >
static constexpr detail::min_viable_uint_t< size > | alphabet_size
| The size of the alphabet, i.e. the number of different values it can take.
Protected Types inherited from seqan3::alphabet_base< gap, 1, char >
using | char_type
| The char representation; conditional needed to make semi alphabet definitions legal.
using | rank_type
| The type of the alphabet when represented as a number (e.g. via to_rank()).

## Detailed Description

The alphabet of a gap character '-'.

The alphabet always has the same value ('-').

// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <iostream>
#include <seqan3/alphabet/gap/gap.hpp>
#include <seqan3/core/debug_stream.hpp>
int main()
{
seqan3::gap my_gap = seqan3::gap{};
seqan3::gap another_gap{};
another_gap.assign_char('A'); // this does not change anything
seqan3::debug_stream << my_gap.to_char(); // outputs '-'
if (my_gap.to_char() == another_gap.to_char())
seqan3::debug_stream << "Both gaps are the same!\n";
}
seqan3::alphabet_base::assign_char
constexpr derived_type & assign_char(char_type const chr) noexcept
Assign from a character, implicitly converts invalid characters.
Definition alphabet_base.hpp:160
seqan3::alphabet_base::to_char
constexpr char_type to_char() const noexcept
Return the letter as a character of char_type.
Definition alphabet_base.hpp:112
seqan3::gap
The alphabet of a gap character '-'.
Definition gap.hpp:36
debug_stream.hpp
Provides seqan3::debug_stream and related types.
gap.hpp
Provides seqan3::gap.
seqan3::debug_stream
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition debug_stream.hpp:38
iostream

This entity is stable. Since version 3.1.

The documentation for this class was generated from the following file:

- gap.hpp

Hide me