SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
seqan3::mask Class Reference

Implementation of a masked alphabet to be used for tuple composites. More...

#include <seqan3/alphabet/mask/mask.hpp>

+ Inheritance diagram for seqan3::mask:

Public Member Functions

Constructors, destructor and assignment
constexpr mask ()=default
 Defaulted.
 
constexpr mask (mask const &)=default
 Defaulted.
 
constexpr mask (mask &&)=default
 Defaulted.
 
constexpr maskoperator= (mask const &)=default
 Defaulted.
 
constexpr maskoperator= (mask &&)=default
 Defaulted.
 
 ~mask ()=default
 Defaulted.
 
- Public Member Functions inherited from seqan3::alphabet_base< mask, 2, void >
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_baseoperator= (alphabet_base const &) noexcept=default
 Defaulted.
 
constexpr alphabet_baseoperator= (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. More...
 
constexpr rank_type to_rank () const noexcept
 Return the letter's numeric value (rank in the alphabet). More...
 
constexpr maskassign_char (char_type const chr) noexcept
 Assign from a character, implicitly converts invalid characters. More...
 
constexpr maskassign_rank (rank_type const c) noexcept
 Assign from a numeric value. More...
 

Static Public Attributes

Boolean values

Static member "booleans" that can be assigned to the alphabet or used in aggregate initialization.

Similar to an Enum interface.

static const mask UNMASKED {mask{}.assign_rank(0)}
 Member for unmasked. More...
 
static const mask MASKED {mask{}.assign_rank(1)}
 Member for masked. More...
 
static const mask unmasked {mask{}.assign_rank(0)}
 Member for unmasked. More...
 
static const mask masked {mask{}.assign_rank(1)}
 Member for masked. More...
 
- Static Public Attributes inherited from seqan3::alphabet_base< mask, 2, void >
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. More...
 

Additional Inherited Members

- Protected Types inherited from seqan3::alphabet_base< mask, 2, void >
using char_type = std::conditional_t< std::same_as< void, void >, char, void >
 The char representation; conditional needed to make semi alphabet definitions legal. More...
 
using rank_type = detail::min_viable_uint_t< size - 1 >
 The type of the alphabet when represented as a number (e.g. via to_rank()). More...
 

Detailed Description

Implementation of a masked alphabet to be used for tuple composites.

This alphabet is not usually used directly, but instead via seqan3::masked.

int main()
{
seqan3::mask another_mask{};
my_mask.assign_rank(false); // will assign my_mask the value mask::unmasked
another_mask.assign_rank(0); // will also assign another_mask the value mask::unmasked
if (my_mask.to_rank() == another_mask.to_rank())
seqan3::debug_stream << "Both are UNMASKED!\n";
}
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:185
constexpr derived_type & assign_rank(rank_type const c) noexcept
Assign from a numeric value.
Definition: alphabet_base.hpp:264
Implementation of a masked alphabet to be used for tuple composites.
Definition: mask.hpp:37
static const mask masked
Member for masked.
Definition: mask.hpp:85
Provides seqan3::debug_stream and related types.
debug_stream_type debug_stream
A global instance of seqan3::debug_stream_type.
Definition: debug_stream.hpp:42
Create a mask composite which can be applied with another alphabet.
See also
Mask submodule , it contains an explanation of hard-masking (unknown character) and soft-masking (lower/upper case letters).

This entity is stable. Since version 3.1.

Member Data Documentation

◆ MASKED

constexpr mask seqan3::mask::MASKED {mask{}.assign_rank(1)}
staticconstexpr

Member for masked.

Deprecated:
Please use seqan3::mask::masked

◆ masked

constexpr mask seqan3::mask::masked {mask{}.assign_rank(1)}
staticconstexpr

Member for masked.

This entity is stable. Since version 3.1.

◆ UNMASKED

constexpr mask seqan3::mask::UNMASKED {mask{}.assign_rank(0)}
staticconstexpr

Member for unmasked.

Deprecated:
Please use seqan3::mask::unmasked

◆ unmasked

constexpr mask seqan3::mask::unmasked {mask{}.assign_rank(0)}
staticconstexpr

Member for unmasked.

This entity is stable. Since version 3.1.


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