135 return rank_to_char_table[rank];
141 using index_t = std::make_unsigned_t<char_type>;
142 return char_to_rank_table[
static_cast<index_t
>(chr)];
146 static constexpr std::array<rank_type, 256> char_to_rank_table{[]()
constexpr
148 std::array<rank_type, 256> rank_table{};
154 rank_table[
'.'] = 0u;
155 rank_table[
'('] = 1u;
156 rank_table[
')'] = 2u;
199 for (
size_t idx = 0ul; idx < len; ++idx)
Provides seqan3::rna_structure_alphabet.
Provides seqan3::alphabet_base.
constexpr dot_bracket3 & assign_char(char_type const chr) noexcept
Definition alphabet_base.hpp:160
constexpr alphabet_base() noexcept=default
constexpr rank_type to_rank() const noexcept
Definition alphabet_base.hpp:134
detail::min_viable_uint_t< size - 1 > rank_type
Definition alphabet_base.hpp:77
std::conditional_t< std::same_as< char, void >, char, char > char_type
Definition alphabet_base.hpp:69
constexpr bool is_pair_close() const noexcept
Check whether the character represents a leftward interaction in an RNA structure.
Definition dot_bracket3.hpp:90
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:119
static constexpr uint8_t max_pseudoknot_depth
The ability of this alphabet to represent pseudoknots, i.e. crossing interactions,...
Definition dot_bracket3.hpp:111
constexpr bool is_unpaired() const noexcept
Check whether the character represents an unpaired position in an RNA structure.
Definition dot_bracket3.hpp:100
constexpr dot_bracket3() noexcept=default
Defaulted.
constexpr bool is_pair_open() const noexcept
Check whether the character represents a rightward interaction in an RNA structure.
Definition dot_bracket3.hpp:80
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition alphabet/concept.hpp:834
The SeqAn namespace for literals.
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26