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

Trace matrix iterator for the pairwise alignment using the full trace matrix. More...

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

+ Inheritance diagram for seqan3::detail::trace_matrix_full< trace_t >::iterator:

Classes

class  column_proxy
 The proxy returned as reference type. More...
 

Public Types

Associated types
using value_type = matrix_column_value_t
 The value type.
 
using reference = column_proxy
 The reference type.
 
using pointer = void
 The pointer type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using iterator_category = std::input_iterator_tag
 The iterator category.
 

Public Member Functions

Constructor, assignment and destructor
 iterator () noexcept=default
 Defaulted.
 
 iterator (iterator const &) noexcept=default
 Defaulted.
 
 iterator (iterator &&) noexcept=default
 Defaulted.
 
iteratoroperator= (iterator const &) noexcept=default
 Defaulted.
 
iteratoroperator= (iterator &&) noexcept=default
 Defaulted.
 
 ~iterator ()=default
 Defaulted.
 
 iterator (trace_matrix_full &host_matrix, size_t const initial_column_id) noexcept
 Initialises the iterator from the underlying matrix.
 
Element access
reference operator* () const
 Returns the range over the current column.
 
Arithmetic operators
iteratoroperator++ ()
 Move this to the next column.
 
void operator++ (int)
 Move this to the next column.
 

Private Types

using matrix_column_type = decltype(views::zip(std::declval< single_trace_column_type >(), std::declval< physical_column_t & >(), std::declval< virtual_column_t & >()))
 The type of the zipped score column.
 
using matrix_column_value_t = std::vector< std::ranges::range_value_t< matrix_column_type > >
 The column type as value type.
 
using single_trace_column_type = std::span< trace_t >
 A lightweight representation of a single column from the complete matrix.
 

Private Attributes

size_t current_column_id {}
 The current column index.
 
trace_matrix_fullhost_ptr {nullptr}
 The pointer to the underlying matrix.
 

Friends

Comparison operators
bool operator== (iterator const &lhs, iterator const &rhs) noexcept
 Tests whether lhs == rhs.
 
bool operator!= (iterator const &lhs, iterator const &rhs) noexcept
 Tests whether lhs != rhs.
 

Detailed Description

template<typename trace_t>
requires std::same_as<trace_t, trace_directions>
class seqan3::detail::trace_matrix_full< trace_t >::iterator

Trace matrix iterator for the pairwise alignment using the full trace matrix.

Implements a counted iterator to keep track of the current column within the matrix. When dereferenced, the iterator returns a view over the allocated memory of the respective columns. The returned view zips the three columns into a single range.

Constructor & Destructor Documentation

◆ iterator()

template<typename trace_t >
seqan3::detail::trace_matrix_full< trace_t >::iterator::iterator ( trace_matrix_full host_matrix,
size_t const  initial_column_id 
)
inlineexplicitnoexcept

Initialises the iterator from the underlying matrix.

Parameters
[in]host_matrixThe underlying matrix.
[in]initial_column_idThe initial column index.

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