159 rank_table[
'.'] = 0u;
160 rank_table[
'('] = 1u;
161 rank_table[
')'] = 2u;
169inline namespace literals
206 for (
size_t idx = 0ul; idx < len; ++idx)
207 vec[idx].assign_char(str[idx]);
Provides seqan3::rna_structure_alphabet.
Provides seqan3::alphabet_base.
A CRTP-base that makes defining a custom alphabet easier.
Definition: alphabet_base.hpp:57
constexpr derived_type & assign_char(char_type const chr) noexcept
Assign from a character, implicitly converts invalid characters.
Definition: alphabet_base.hpp:163
constexpr rank_type to_rank() const noexcept
Return the letter's numeric value (rank in the alphabet).
Definition: alphabet_base.hpp:137
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.
Definition: alphabet_base.hpp:199
rank_type rank
The value of the alphabet letter is stored as the rank.
Definition: alphabet_base.hpp:261
The three letter RNA structure alphabet of the characters ".()"..
Definition: dot_bracket3.hpp:54
constexpr bool is_pair_close() const noexcept
Check whether the character represents a leftward interaction in an RNA structure.
Definition: dot_bracket3.hpp:93
static constexpr rank_type char_to_rank(char_type const chr)
Returns the rank representation of character.
Definition: dot_bracket3.hpp:142
constexpr std::optional< uint8_t > pseudoknot_id() const noexcept
Get an identifier for a pseudoknotted interaction, where opening and closing brackets of the same typ...
Definition: dot_bracket3.hpp:122
static constexpr uint8_t max_pseudoknot_depth
The ability of this alphabet to represent pseudoknots, i.e. crossing interactions,...
Definition: dot_bracket3.hpp:114
static constexpr char_type rank_to_char_table[alphabet_size]
The lookup table used in rank_to_char.
Definition: dot_bracket3.hpp:133
constexpr bool is_unpaired() const noexcept
Check whether the character represents an unpaired position in an RNA structure.
Definition: dot_bracket3.hpp:103
constexpr dot_bracket3() noexcept=default
Defaulted.
static constexpr char_type rank_to_char(rank_type const rank)
Returns the character representation of rank.
Definition: dot_bracket3.hpp:136
constexpr bool is_pair_open() const noexcept
Check whether the character represents a rightward interaction in an RNA structure.
Definition: dot_bracket3.hpp:83
static constexpr std::array< rank_type, 256 > char_to_rank_table
The lookup table used in char_to_rank.
Definition: dot_bracket3.hpp:151
friend base_t
Befriend seqan3::alphabet_base.
Definition: dot_bracket3.hpp:60
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29