A representation of a location or offset within a two-dimensional matrix. More...
#include <seqan3/alignment/matrix/detail/matrix_coordinate.hpp>
Public Member Functions | |
template<std::integral first_index_t, std::integral second_index_t> | |
constexpr | operator std::pair< first_index_t, second_index_t > () const noexcept |
Explicit conversion to the a std::pair. | |
Constructors, destructor and assignment | |
constexpr | matrix_index ()=default |
Defaulted. | |
constexpr | matrix_index (matrix_index const &)=default |
Defaulted. | |
constexpr | matrix_index (matrix_index &&)=default |
Defaulted. | |
constexpr matrix_index & | operator= (matrix_index const &)=default |
Defaulted. | |
constexpr matrix_index & | operator= (matrix_index &&)=default |
Defaulted. | |
~matrix_index ()=default | |
Defaulted. | |
constexpr | matrix_index (row_index_type< index_t > const row_idx, column_index_type< index_t > const col_idx) noexcept |
Construction from strongly typed row index and column index. More... | |
template<seqan3::arithmetic scalar_index_t> | |
constexpr | matrix_index (row_index_type< scalar_index_t > const row_idx, column_index_type< scalar_index_t > const col_idx) noexcept |
Construction from strongly typed row index and column index over a scalar type when the index is a simd vector. More... | |
template<std::integral other_index_t> | |
constexpr | matrix_index (matrix_index< other_index_t > other) noexcept |
Construction from other matrix_index with different integral type. More... | |
Public Attributes | |
index_t | col {} |
The column index. | |
index_t | row {} |
The row index. | |
Related Functions | |
(Note that these are not member functions.) | |
using | matrix_coordinate = matrix_index< size_t > |
A coordinate type to access an element inside of a two-dimensional matrix. | |
Type deduction guides | |
matrix_index () -> matrix_index< std::ptrdiff_t > | |
Deduces the default index type to std::ptrdiff_t. | |
template<std::integral row_index_t, std::integral col_index_t> | |
matrix_index (row_index_type< row_index_t >, column_index_type< col_index_t >) -> matrix_index< std::common_type_t< row_index_t, col_index_t >> | |
Deduces the index type from the common type of both index types. | |
template<simd_index index_t> | |
matrix_index (row_index_type< index_t >, column_index_type< index_t >) -> matrix_index< index_t > | |
Deduces the index type from the simd vector index type. | |
A representation of a location or offset within a two-dimensional matrix.
index_t | The underlying index type; must model seqan3::arithmetic or seqan3::simd::simd_index. |
|
inlineconstexprnoexcept |
Construction from strongly typed row index and column index.
row_idx | The row index to set. |
col_idx | The column index to set. |
|
inlineconstexprnoexcept |
Construction from strongly typed row index and column index over a scalar type when the index is a simd vector.
scalar_index_t | The type of the scalar index type; must model seqan3::arithmetic and must model std::convertible_to the scalar type of the simd vector index_t . |
row_idx | The row index to set. |
col_idx | The column index to set. |
This constructor initialises the row and col index which is represented as simd vectors. The vectors are initialised with the scalar types of the given strong types over the scalar value. This constructor is only available if index_t
is a simd vector type and the scalar_index_t
is convertible to the scalar type of the simd index.
|
inlineexplicitconstexprnoexcept |
Construction from other matrix_index with different integral type.
[in] | other | The other matrix_index to construct from. |