SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
|
Provides a range interface for alignment matrices. More...
#include <seqan3/alignment/matrix/detail/alignment_matrix_column_major_range_base.hpp>
Classes | |
class | alignment_column_type |
Represents a column within an alignment matrix. More... | |
class | iterator_type |
A column iterator over the alignment matrix. More... | |
Public Member Functions | |
Iterators | |
The matrix type is not const-iterable. | |
constexpr iterator | begin () noexcept |
Returns an iterator to the first column of the matrix. | |
constexpr iterator | begin () const noexcept=delete |
Deleted begin for const-qualified alignment matrix. | |
constexpr sentinel | end () noexcept |
Returns a sentinel marking the end of the matrix. | |
constexpr sentinel | end () const noexcept=delete |
Deleted end for const-qualified alignment matrix. | |
Private Types | |
using | iterator = iterator_type |
The type of the iterator. | |
using | sentinel = std::default_sentinel_t |
The type of sentinel. | |
Private Member Functions | |
Constructors, destructor and assignment | |
constexpr | alignment_matrix_column_major_range_base ()=default |
Defaulted. | |
constexpr | alignment_matrix_column_major_range_base (alignment_matrix_column_major_range_base const &)=default |
Defaulted. | |
constexpr | alignment_matrix_column_major_range_base (alignment_matrix_column_major_range_base &&)=default |
Defaulted. | |
constexpr alignment_matrix_column_major_range_base & | operator= (alignment_matrix_column_major_range_base const &)=default |
Defaulted. | |
constexpr alignment_matrix_column_major_range_base & | operator= (alignment_matrix_column_major_range_base &&)=default |
Defaulted. | |
~alignment_matrix_column_major_range_base ()=default | |
Defaulted. | |
Required interfaces | |
The derived class must implement the following methods. | |
value_type | make_proxy (iter_t host_iter) noexcept |
Creates the proxy value returned when dereferencing the alignment-column-iterator. | |
alignment_column_type | initialise_column (size_t column_index) |
Returns the current alignment-column at the given column_index . | |
template<typename iter_t > | |
constexpr void | on_column_iterator_creation (iter_t host_iter) noexcept |
Allows additional initialisations when calling begin on an alignment-column. | |
template<typename iter_t > | |
constexpr void | before_column_iterator_increment (iter_t host_iter) noexcept |
Allows to perform additional steps before incrementing the alignment-column-iterator. | |
template<typename iter_t > | |
constexpr void | after_column_iterator_increment (iter_t host_iter) noexcept |
Allows to perform additional steps after incrementing the alignment-column-iterator. | |
Private Attributes | |
friend | derived_t |
Befriend the derived type. | |
Required types | |
The derived class must implement the following types. | |
typedef | value_type |
The proxy type of an alignment matrix. | |
typedef | column_data_view_type |
The view over the current alignment-column; must model std::ranges::view and std::ranges::input_range. | |
Provides a range interface for alignment matrices.
derived_t | The derived type implementing the data model of the matrix (see details for more information). |
This crtp-base class provides a range based interface for alignment matrices. It generates a range of ranges, where both the outer range and the inner ranges model std::ranges::input_range. The interface uses a column-major-order to iterate over the matrix, i.e. the outer range iterates over the columns and the inner range over the num_rows of each column. In addition, the inner range type, also referred to as alignment-column
, must model std::ranges::view. It is a shallow wrapper around the actual column stored in the derived_t
, who implements the corresponding data model. The current alignment-column is created within the derived_t
when the iterator over the outer range is dereferenced. The iterator over the resulting alignment-column
is further refined by the derived_t
to implement the actual behavior of the underlying alignment matrix.
This base class requires the following functions and types defined within the derived type in order to customise the returned type over the underlying matrix.
The following functions are not mandatory but can be overriden by the derived type:
|
no-apiinlineconstexprprivatenoexcept |
Allows to perform additional steps after incrementing the alignment-column-iterator.
iter_t | The iterator type of the host iterator. |
[in] | host_iter | The wrapped iterator to the actual memory storage. |
|
no-apiinlineconstexprprivatenoexcept |
Allows to perform additional steps before incrementing the alignment-column-iterator.
iter_t | The iterator type of the host iterator. |
[in] | host_iter | The wrapped iterator to the actual memory storage. |
|
no-apiinlineprivate |
Returns the current alignment-column at the given column_index
.
[in] | column_index | The current column position of the outer matrix iterator. |
Creates a new seqan3::detail::alignment_matrix_column_major_range_base::alignment_column_type
initialised with the current column of the alignment matrix depending on the given column_index
. The alignment_column_type
stores a column view as defined by the derived class using the seqan3::detail::alignment_matrix_column_major_range_base::column_data_view_type type definition.
|
no-apiinlineprivatenoexcept |
Creates the proxy value returned when dereferencing the alignment-column-iterator.
[in] | host_iter | The wrapped iterator to the actual memory storage. |
|
no-apiinlineconstexprprivatenoexcept |
Allows additional initialisations when calling begin on an alignment-column.
iter_t | The iterator type of the host iterator. |
[in] | host_iter | The wrapped iterator to the actual memory storage. |
|
no-apiprivate |
The view over the current alignment-column; must model std::ranges::view and std::ranges::input_range.
|
no-apiprivate |
The proxy type of an alignment matrix.