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

Score matrix iterator for the pairwise alignment using only a single column. More...

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

+ Inheritance diagram for seqan3::detail::score_matrix_single_column< score_t >::matrix_iterator:

Public Types

Associated types
using value_type = decltype(std::declval< matrix_column_t >()|transform_to_affine_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_category = std::input_iterator_tag
 The iterator category.
 

Public Member Functions

Constructor, assignment and destructor
 matrix_iterator () noexcept=default
 Defaulted.
 
 matrix_iterator (matrix_iterator const &) noexcept=default
 Defaulted.
 
 matrix_iterator (matrix_iterator &&) noexcept=default
 Defaulted.
 
matrix_iteratoroperator= (matrix_iterator const &) noexcept=default
 Defaulted.
 
matrix_iteratoroperator= (matrix_iterator &&) noexcept=default
 Defaulted.
 
 ~matrix_iterator ()=default
 Defaulted.
 
 matrix_iterator (score_matrix_single_column &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
matrix_iteratoroperator++ ()
 Move this to the next column.
 
void operator++ (int)
 Move this to the next column.
 

Private Types

using matrix_column_t = decltype(views::zip(std::declval< physical_column_t & >(), std::declval< physical_column_t & >(), std::declval< virtual_column_t & >()))
 The type of the zipped score column.
 

Private Attributes

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

Static Private Attributes

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

Friends

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

Detailed Description

template<typename score_t>
requires (arithmetic<score_t> || simd_concept<score_t>)
class seqan3::detail::score_matrix_single_column< score_t >::matrix_iterator

Score matrix iterator for the pairwise alignment using only a single column.

Implements a counted iterator to simulate the iteration over the actual 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 and transforms the returned tuple to a seqan3::detail::affine_cell_proxy to simplify the access to the correct values without knowing the internal tuple layout returned by the seqan3::views::zip view.

Constructor & Destructor Documentation

◆ matrix_iterator()

template<typename score_t >
seqan3::detail::score_matrix_single_column< score_t >::matrix_iterator::matrix_iterator ( score_matrix_single_column 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.

Member Data Documentation

◆ transform_to_affine_cell

template<typename score_t >
constexpr auto seqan3::detail::score_matrix_single_column< score_t >::matrix_iterator::transform_to_affine_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