SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::combined_score_and_trace_matrix< score_matrix_t, trace_matrix_t >::iterator Class Reference

Combined score and trace matrix iterator for the pairwise sequence alignment. More...

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

+ Inheritance diagram for seqan3::detail::combined_score_and_trace_matrix< score_matrix_t, trace_matrix_t >::iterator:

Public Types

Associated types
using value_type = decltype(std::declval< combined_column_type >()|transform_to_combined_matrix_cell)
 The value type.
 
using reference = value_type
 The reference type.
 
using pointer = void
 The pointer type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using iterator_concept = std::input_iterator_tag
 The iterator concept.
 

Public Member Functions

Constructor, assignment and destructor
 iterator ()=default
 Defaulted.
 
 iterator (iterator const &)=default
 Defaulted.
 
 iterator (iterator &&)=default
 Defaulted.
 
iteratoroperator= (iterator const &)=default
 Defaulted.
 
iteratoroperator= (iterator &&)=default
 Defaulted.
 
 ~iterator ()=default
 Defaulted.
 
 iterator (score_matrix_iter_type score_matrix_it, trace_matrix_iter_type trace_matrix_it) noexcept
 Initialises the iterator from the underlying matrix.
 
Element access
reference operator* () const
 Returns the range over the current column.
 
Arithmetic operators
iteratoroperator++ ()
 Advance the iterator to the next alignment matrix column.
 
void operator++ (int)
 Advance the iterator to the next alignment matrix column.
 

Private Types

using combined_column_type = decltype(views::zip(std::declval< score_matrix_reference_type >(), std::declval< trace_matrix_reference_type >()))
 The combined column type.
 
using score_matrix_iter_type = std::ranges::iterator_t< score_matrix_t >
 The type of the score matrix iterator.
 
using score_matrix_reference_type = std::ranges::range_reference_t< score_matrix_t >
 The reference type of the score matrix.
 
using trace_matrix_iter_type = std::ranges::iterator_t< trace_matrix_t >
 The type of the trace matrix iterator.
 
using trace_matrix_reference_type = std::ranges::range_reference_t< trace_matrix_t >
 The reference type of the trace matrix.
 

Private Attributes

score_matrix_iter_type score_matrix_it
 The current iterator over the score matrix.
 
trace_matrix_iter_type trace_matrix_it
 The current iterator over the trace matrix.
 

Static Private Attributes

static constexpr auto transform_to_combined_matrix_cell
 The transform adaptor to convert the tuple from the zip view into a seqan3::detail::affine_cell_type.
 

Friends

template<std::ranges::input_range other_score_matrix_t, std::ranges::input_range other_trace_matrix_t>
class combined_score_and_trace_matrix
 

Detailed Description

template<std::ranges::input_range score_matrix_t, std::ranges::input_range trace_matrix_t>
requires (std::ranges::input_range<std::ranges::range_reference_t<score_matrix_t>> && std::ranges::input_range<std::ranges::range_reference_t<trace_matrix_t>>)
class seqan3::detail::combined_score_and_trace_matrix< score_matrix_t, trace_matrix_t >::iterator

Combined score and trace matrix iterator for the pairwise sequence alignment.

Implements a zipped iterator over the given score and trace matrix. It assumes that both matrices have the same number of columns. If this invariant does not hold, using this iterator is undefined behaviour. When dereferencing the iterator, the current score matrix column and trace matrix column will be zipped using the seqan3::views::zip view and additionally transformed such that the reference type of the returned alignment column is a seqan3::detail::affine_cell_proxy holding the score and trace values of the respective alignment matrix cells.

Constructor & Destructor Documentation

◆ iterator()

template<std::ranges::input_range score_matrix_t, std::ranges::input_range trace_matrix_t>
seqan3::detail::combined_score_and_trace_matrix< score_matrix_t, trace_matrix_t >::iterator::iterator ( score_matrix_iter_type  score_matrix_it,
trace_matrix_iter_type  trace_matrix_it 
)
inlineexplicitnoexcept

Initialises the iterator from the underlying matrix.

Parameters
[in]score_matrix_itThe current iterator over the score matrix.
[in]trace_matrix_itThe current iterator over the trace matrix.

Member Data Documentation

◆ transform_to_combined_matrix_cell

template<std::ranges::input_range score_matrix_t, std::ranges::input_range trace_matrix_t>
constexpr auto seqan3::detail::combined_score_and_trace_matrix< score_matrix_t, trace_matrix_t >::iterator::transform_to_combined_matrix_cell
staticconstexprprivate
Initial value:
= std::views::transform(
[](auto && tpl) -> affine_cell_proxy<std::remove_cvref_t<decltype(tpl)>>
{
using fwd_tuple_t = decltype(tpl);
return affine_cell_proxy<std::remove_cvref_t<fwd_tuple_t>>{std::forward<fwd_tuple_t>(tpl)};
})

The transform adaptor to convert the tuple from the zip view into a seqan3::detail::affine_cell_type.


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