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

A trace iterator for banded trace matrices. More...

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

+ Inheritance diagram for seqan3::detail::trace_iterator_banded< matrix_iter_t >:

Public Member Functions

constexpr matrix_coordinate coordinate () const noexcept
 Returns the current coordinate in two-dimensional space.
 
Constructors, destructor and assignment
constexpr trace_iterator_banded ()=default
 Defaulted.
 
constexpr trace_iterator_banded (trace_iterator_banded const &)=default
 Defaulted.
 
constexpr trace_iterator_banded (trace_iterator_banded &&)=default
 Defaulted.
 
constexpr trace_iterator_bandedoperator= (trace_iterator_banded const &)=default
 Defaulted.
 
constexpr trace_iterator_bandedoperator= (trace_iterator_banded &&)=default
 Defaulted.
 
 ~trace_iterator_banded ()=default
 Defaulted.
 
template<typename index_t >
constexpr trace_iterator_banded (matrix_iter_t const matrix_iter, column_index_type< index_t > const &pivot_column) noexcept
 Constructs from the underlying trace matrix iterator indicating the start of the trace path.
 
template<two_dimensional_matrix_iterator other_matrix_iter_t>
requires std::constructible_from<matrix_iter_t, other_matrix_iter_t>
constexpr trace_iterator_banded (trace_iterator_banded< other_matrix_iter_t > const other) noexcept
 Constructs from the underlying trace matrix iterator indicating the start of the trace path.
 
- Public Member Functions inherited from seqan3::detail::trace_iterator_base< trace_iterator_banded< matrix_iter_t >, matrix_iter_t >
reference operator* () const noexcept
 Returns the current trace direction.
 
pointer operator-> () const noexcept
 Returns a pointer to the current trace direction.
 
constexpr matrix_coordinate coordinate () const noexcept
 Returns the current coordinate in two-dimensional space.
 
constexpr trace_iterator_banded< matrix_iter_t > & operator++ () noexcept
 Advances the iterator by one.
 
constexpr trace_iterator_banded< matrix_iter_t > operator++ (int) noexcept
 Returns an iterator advanced by one.
 

Private Types

using base_t = trace_iterator_base< trace_iterator_banded< matrix_iter_t >, matrix_iter_t >
 The type of the base class.
 

Private Member Functions

constexpr void go_diagonal (matrix_iter_t &iter) const noexcept
 Moves iterator to previous up cell.
 
constexpr void go_left (matrix_iter_t &iter) const noexcept
 Moves iterator to previous left cell.
 

Private Attributes

friend base_t
 Befriend base class.
 
size_t pivot_column {}
 The largest column index which is inside of the band in the first row of the matrix.
 

Additional Inherited Members

- Public Types inherited from seqan3::detail::trace_iterator_base< trace_iterator_banded< matrix_iter_t >, matrix_iter_t >
using value_type = trace_directions
 The value type.
 
using reference = trace_directions const &
 The reference type.
 
using pointer = value_type const *
 The pointer type.
 
using difference_type = std::ptrdiff_t
 The difference type.
 
using iterator_category = std::forward_iterator_tag
 

Detailed Description

template<two_dimensional_matrix_iterator matrix_iter_t>
class seqan3::detail::trace_iterator_banded< matrix_iter_t >

A trace iterator for banded trace matrices.

Template Parameters
matrix_iter_tThe wrapped matrix iterator; must model seqan3::detail::two_dimensional_matrix_iterator and the iterator's value type must be the same as seqan3::detail::trace_directions, i.e. std::same_as<std::iter_value_t<matrix_iter_t>, trace_directions> must evaluate to true.

This iterator follows a given trace in a banded trace matrix.

Constructor & Destructor Documentation

◆ trace_iterator_banded() [1/2]

template<two_dimensional_matrix_iterator matrix_iter_t>
template<typename index_t >
constexpr seqan3::detail::trace_iterator_banded< matrix_iter_t >::trace_iterator_banded ( matrix_iter_t const  matrix_iter,
column_index_type< index_t > const &  pivot_column 
)
inlineconstexprnoexcept

Constructs from the underlying trace matrix iterator indicating the start of the trace path.

Parameters
[in]matrix_iterThe underlying matrix iterator.
[in]pivot_columnThe last column index which is still inside of the band in the first row of the banded matrix.

◆ trace_iterator_banded() [2/2]

template<two_dimensional_matrix_iterator matrix_iter_t>
template<two_dimensional_matrix_iterator other_matrix_iter_t>
requires std::constructible_from<matrix_iter_t, other_matrix_iter_t>
constexpr seqan3::detail::trace_iterator_banded< matrix_iter_t >::trace_iterator_banded ( trace_iterator_banded< other_matrix_iter_t > const  other)
inlineconstexprnoexcept

Constructs from the underlying trace matrix iterator indicating the start of the trace path.

Template Parameters
other_matrix_iter_tThe underlying matrix iterator type of other; the condition std::constructible_from<matrix_iter_t, other_matrix_iter_t> must evaluate to true.
Parameters
[in]otherThe underlying matrix iterator.

Allows the conversion of non-const to const iterator.

Member Function Documentation

◆ coordinate()

template<two_dimensional_matrix_iterator matrix_iter_t>
constexpr matrix_coordinate seqan3::detail::trace_iterator_banded< matrix_iter_t >::coordinate ( ) const
inlineconstexprnoexcept

Returns the current coordinate in two-dimensional space.

◆ go_diagonal()

template<two_dimensional_matrix_iterator matrix_iter_t>
constexpr void seqan3::detail::trace_iterator_banded< matrix_iter_t >::go_diagonal ( matrix_iter_t &  iter) const
inlineconstexprprivatenoexcept

Moves iterator to previous up cell.

◆ go_left()

template<two_dimensional_matrix_iterator matrix_iter_t>
constexpr void seqan3::detail::trace_iterator_banded< matrix_iter_t >::go_left ( matrix_iter_t &  iter) const
inlineconstexprprivatenoexcept

Moves iterator to previous left cell.


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