SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator Struct Reference

The iterator needed to implement seqan3::detail::edit_distance_trace_matrix_full::trace_path. More...

#include <seqan3/alignment/matrix/detail/edit_distance_trace_matrix_full.hpp>

+ Inheritance diagram for seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator:

Public Types

Associated types
using iterator_category = std::input_iterator_tag
 Input iterator tag.
 
using value_type = detail::trace_directions
 The value type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 

Public Member Functions

Element access
constexpr value_type operator* () const
 Returns the current trace direction.
 
constexpr matrix_coordinate const & coordinate () const
 Returns the current coordinate in two-dimensional space.
 
Arithmetic operators
constexpr trace_path_iteratoroperator++ ()
 Advances the iterator by one.
 
constexpr void operator++ (int)
 Advances the iterator by one.
 

Public Attributes

matrix_coordinate coordinate_ {}
 The current coordinate.
 
edit_distance_trace_matrix_full const * parent {nullptr}
 The parent trace matrix.
 

Static Public Attributes

static constexpr value_type D = value_type::diagonal
 Shortcut for seqan3::detail::trace_directions::diagonal.
 
static constexpr value_type L = value_type::left
 Shortcut for seqan3::detail::trace_directions::left.
 
static constexpr value_type N = value_type::none
 Shortcut for seqan3::detail::trace_directions::none.
 
static constexpr value_type U = value_type::up
 Shortcut for seqan3::detail::trace_directions::up.
 

Friends

Comparison operators
bool operator== (trace_path_iterator const &it, std::default_sentinel_t)
 Returns true if both iterators are equal, false otherwise.
 
bool operator== (std::default_sentinel_t, trace_path_iterator const &it)
 Returns true if both iterators are equal, false otherwise.
 
bool operator!= (trace_path_iterator const &it, std::default_sentinel_t)
 Returns true if both iterators are not equal, false otherwise.
 
bool operator!= (std::default_sentinel_t, trace_path_iterator const &it)
 Returns true if both iterators are not equal, false otherwise.
 

Detailed Description

template<typename word_t, bool is_semi_global, bool use_max_errors>
struct seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator

The iterator needed to implement seqan3::detail::edit_distance_trace_matrix_full::trace_path.

This iterator follows the trace matrix from a starting coordinate until it finds a seqan3::detail::trace_directions::none. This iterator guarantees that it returns exactly only one of these values (normally seqan3::detail::trace_directions can be a combination of these values):

This requirement is needed to use the seqan3::detail::aligned_sequence_builder.

Member Typedef Documentation

◆ difference_type

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::difference_type = std::ptrdiff_t

The difference type.

◆ value_type

template<typename word_t , bool is_semi_global, bool use_max_errors>
using seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::value_type = detail::trace_directions

The value type.

Member Function Documentation

◆ coordinate()

template<typename word_t , bool is_semi_global, bool use_max_errors>
constexpr matrix_coordinate const & seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::coordinate ( ) const
inlineconstexpr

Returns the current coordinate in two-dimensional space.

◆ operator*()

template<typename word_t , bool is_semi_global, bool use_max_errors>
constexpr value_type seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::operator* ( ) const
inlineconstexpr

Returns the current trace direction.

◆ operator++() [1/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
constexpr trace_path_iterator & seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::operator++ ( )
inlineconstexpr

Advances the iterator by one.

◆ operator++() [2/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
constexpr void seqan3::detail::edit_distance_trace_matrix_full< word_t, is_semi_global, use_max_errors >::trace_path_iterator::operator++ ( int  )
inlineconstexpr

Advances the iterator by one.

Friends And Related Symbol Documentation

◆ operator!= [1/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
bool operator!= ( std::default_sentinel_t  ,
trace_path_iterator const &  it 
)
friend

Returns true if both iterators are not equal, false otherwise.

◆ operator!= [2/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
bool operator!= ( trace_path_iterator const &  it,
std::default_sentinel_t   
)
friend

Returns true if both iterators are not equal, false otherwise.

◆ operator== [1/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
bool operator== ( std::default_sentinel_t  ,
trace_path_iterator const &  it 
)
friend

Returns true if both iterators are equal, false otherwise.

◆ operator== [2/2]

template<typename word_t , bool is_semi_global, bool use_max_errors>
bool operator== ( trace_path_iterator const &  it,
std::default_sentinel_t   
)
friend

Returns true if both iterators are equal, false otherwise.


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