SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
A matrix over coordinates. More...
#include <seqan3/alignment/matrix/detail/coordinate_matrix.hpp>
Classes | |
struct | convert_to_matrix_coordinate |
A function object that converts a column index and a row index to a seqan3::detail::matrix_coordinate. More... | |
class | iterator |
The iterator for the seqan3::detail::coordinate_matrix. More... | |
Public Member Functions | |
Constructors, destructor and assignment | |
coordinate_matrix ()=default | |
Defaulted. | |
coordinate_matrix (coordinate_matrix const &)=default | |
Defaulted. | |
coordinate_matrix (coordinate_matrix &&)=default | |
Defaulted. | |
coordinate_matrix & | operator= (coordinate_matrix const &)=default |
Defaulted. | |
coordinate_matrix & | operator= (coordinate_matrix &&)=default |
Defaulted. | |
~coordinate_matrix ()=default | |
Defaulted. | |
template<std::integral column_index_t, std::integral row_index_t> | |
void | resize (column_index_type< column_index_t > const column_count, row_index_type< row_index_t > const row_count) noexcept |
Resets the coordinate matrix with the given end column index and end row index representing the new dimensions of the matrix. | |
Iterators | |
iterator | begin () const noexcept |
Returns the iterator pointing to the first column of the matrix. | |
iterator | end () const noexcept |
Returns the iterator pointing to the end column of the matrix. | |
Private Types | |
template<typename simd_index_t > | |
using | lazy_scalar_type_t = typename simd_traits< simd_index_t >::scalar_type |
Type alias for the scalar type defined by the seqan3::simd::simd_traits type. | |
using | size_type = lazy_conditional_t< simd_concept< index_t >, lazy< lazy_scalar_type_t, index_t >, index_t > |
The internal size type which depends on index_t being a simd vector or a scalar type. | |
Private Attributes | |
size_type | column_count {} |
The number of columns (corresponds to the size of one row). | |
size_type | row_count {} |
The number od rows (corresponds to the size of one column). | |
A matrix over coordinates.
index_t | The underlying matrix index type; must mode std::integral or seqan3::simd::simd_index. |
This matrix emulates a two-dimensional index, such that each cell inside of the alignment matrix can be located through a unique coordinate (=index). In the alignment algorithm this matrix is paired with the alignment matrix to form an indexed alignment matrix.
This matrix is cheap as it stores only the dimensions of the matrix and does not allocate any memory for the coordinates. It uses the seqan3::detail::matrix_coordinate_iterator to iterate over the columns of this virtual matrix. When the seqan3::detail::coordinate_matrix::matrix_coordinate_iterator is dereferenced it returns an on-the-fly constructed range (prvalue) representing the current indexed column. The reference type of this range is seqan3::detail::matrix_coordinate.
If the index_t
is a simd vector the matrix implements a vectorised coordinate matrix instead. In this case the matrix uses a seqan3::detail::coordinate_matrix::matrix_coordinate_simd_iterator to iterate over the vectorised matrix. When the seqan3::detail::coordinate_matrix::matrix_coordinate_iterator is dereferenced it returns an on-the-fly constructed range (prvalue) representing the current simd coordinate column. The reference type of this range is seqan3::detail::simd_matrix_coordinate.
|
inlinenoexcept |
Resets the coordinate matrix with the given end column index and end row index representing the new dimensions of the matrix.
column_index_t | The size type for the column count; must model std:integral. |
row_index_t | The size type for the row count; must model std:integral. |
[in] | column_count | The number of columns (corresponds to the size of one row). |
[in] | row_count | The number od rows (corresponds to the size of one column). |
Constant
noexcept