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

The iterator for the seqan3::detail::coordinate_matrix. More...

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

+ Inheritance diagram for seqan3::detail::coordinate_matrix< index_t >::iterator:

Public Types

Associated types
using value_type = decltype(std::declval< iota_view_t >()|std::views::transform(convert_to_matrix_coordinate{index_t{} }))
 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::forward_iterator_tag
 The iterator category.
 

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 (size_type column_id, size_type row_count) noexcept
 Constructs and initialises the iterator with the current column index and the row index marking the end of the rows (size of one column).
 
Element access
auto operator* () const
 Access the pointed-to matrix coordinate column.
 
Arithmetic operators
iteratoroperator++ ()
 Increments the iterator to the next column.
 
iterator operator++ (int)
 Increments the iterator to the next column and returns the iterator pointing to the previous column.
 

Private Types

using iota_view_t = lazy_conditional_t< simd_index< index_t >, lazy< iota_simd_view, index_t >, decltype(std::views::iota(size_type{}, size_type{}))>
 The iota view type which depends on the index type.
 

Private Attributes

index_t column_id {0}
 The currently represented column index.
 
size_type row_count {0}
 The number of rows (corresponds to the size of a column).
 

Friends

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

Detailed Description

template<typename index_t>
requires (std::integral<index_t> || simd_index<index_t>)
class seqan3::detail::coordinate_matrix< index_t >::iterator

The iterator for the seqan3::detail::coordinate_matrix.

Iterates over the columns of the underlying seqan3::detail::coordinate_matrix. The iterator returns a transformed std::ranges::views::iota view over the row indices. In the transformation every row index is converted to a seqan3::detail::matrix_coordinate using the seqan3::detail::convert_to_matrix_coordinate function object.

Constructor & Destructor Documentation

◆ iterator()

template<typename index_t >
seqan3::detail::coordinate_matrix< index_t >::iterator::iterator ( size_type  column_id,
size_type  row_count 
)
inlineexplicitnoexcept

Constructs and initialises the iterator with the current column index and the row index marking the end of the rows (size of one column).

Parameters
[in]column_idThe currently represented column index.
[in]row_countThe number of rows (corresponds to the size of a column).

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