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

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_indexoperator= (matrix_index const &)=default
 Defaulted.
 
constexpr matrix_indexoperator= (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.
 
template<seqan3::arithmetic scalar_index_t>
requires simd_index<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.
 
template<std::integral other_index_t>
requires (!std::same_as<other_index_t, index_t>)
constexpr matrix_index (matrix_index< other_index_t > other) noexcept
 Construction from other matrix_index with different integral type.
 

Public Attributes

index_t col {}
 The column index.
 
index_t row {}
 The row index.
 

Related Symbols

(Note that these are not member symbols.)

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.
 

Detailed Description

template<typename index_t>
requires (std::integral<index_t> || simd_index<index_t>)
struct seqan3::detail::matrix_index< index_t >

A representation of a location or offset within a two-dimensional matrix.

Template Parameters
index_tThe underlying index type; must model seqan3::arithmetic or seqan3::simd::simd_index.

Constructor & Destructor Documentation

◆ matrix_index() [1/3]

template<typename index_t >
constexpr seqan3::detail::matrix_index< index_t >::matrix_index ( row_index_type< index_t > const  row_idx,
column_index_type< index_t > const  col_idx 
)
inlineconstexprnoexcept

Construction from strongly typed row index and column index.

Parameters
row_idxThe row index to set.
col_idxThe column index to set.

◆ matrix_index() [2/3]

template<typename index_t >
template<seqan3::arithmetic scalar_index_t>
requires simd_index<index_t>
constexpr seqan3::detail::matrix_index< index_t >::matrix_index ( row_index_type< scalar_index_t > const  row_idx,
column_index_type< scalar_index_t > const  col_idx 
)
inlineconstexprnoexcept

Construction from strongly typed row index and column index over a scalar type when the index is a simd vector.

Template Parameters
scalar_index_tThe 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.
Parameters
row_idxThe row index to set.
col_idxThe 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.

◆ matrix_index() [3/3]

template<typename index_t >
template<std::integral other_index_t>
requires (!std::same_as<other_index_t, index_t>)
constexpr seqan3::detail::matrix_index< index_t >::matrix_index ( matrix_index< other_index_t >  other)
inlineexplicitconstexprnoexcept

Construction from other matrix_index with different integral type.

Parameters
[in]otherThe other matrix_index to construct from.

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