23namespace seqan3::detail
29template <
typename index_type>
30 requires (std::integral<index_type> || simd_index<index_type>)
31struct column_index_type : detail::strong_type<index_type, column_index_type<index_type>>
34 using detail::strong_type<index_type, column_index_type<index_type>>::strong_type;
42template <std::
signed_
integral index_type>
43column_index_type(index_type) -> column_index_type<std::ptrdiff_t>;
46template <std::
unsigned_
integral index_type>
47column_index_type(index_type) -> column_index_type<size_t>;
50template <simd_index index_type>
51column_index_type(index_type) -> column_index_type<index_type>;
58template <
typename index_type>
59 requires (std::integral<index_type> || simd_index<index_type>)
60struct row_index_type : detail::strong_type<index_type, row_index_type<index_type>>
63 using detail::strong_type<index_type, row_index_type<index_type>>::strong_type;
71template <std::
signed_
integral index_type>
72row_index_type(index_type) -> row_index_type<std::ptrdiff_t>;
75template <std::
unsigned_
integral index_type>
76row_index_type(index_type) -> row_index_type<size_t>;
79template <simd_index index_type>
80row_index_type(index_type) -> row_index_type<index_type>;
87template <
typename index_t>
88 requires (std::integral<index_t> || simd_index<index_t>)
94 constexpr matrix_index() =
default;
95 constexpr matrix_index(matrix_index
const &) =
default;
96 constexpr matrix_index(matrix_index &&) =
default;
97 constexpr matrix_index & operator=(matrix_index
const &) =
default;
98 constexpr matrix_index & operator=(matrix_index &&) =
default;
99 ~matrix_index() =
default;
105 constexpr matrix_index(row_index_type<index_t>
const row_idx, column_index_type<index_t>
const col_idx) noexcept :
126 template <seqan3::arithmetic scalar_index_t>
127 constexpr matrix_index(row_index_type<scalar_index_t>
const row_idx,
128 column_index_type<scalar_index_t>
const col_idx)
noexcept
129 requires simd_index<index_t>
132 row{simd::fill<index_t>(
static_cast<typename simd_traits<index_t>::scalar_type
>(row_idx.get()))},
133 col{simd::fill<index_t>(
static_cast<typename simd_traits<index_t>::scalar_type
>(col_idx.get()))}
139 template <std::
integral other_index_t>
140 requires (!std::same_as<other_index_t, index_t>)
141 explicit constexpr matrix_index(matrix_index<other_index_t> other) noexcept :
142 row{
static_cast<index_t
>(other.row)},
143 col{
static_cast<index_t
>(other.col)}
148 template <std::
integral first_index_t, std::
integral second_index_t>
151 return std::pair{
static_cast<first_index_t
>(col),
static_cast<second_index_t
>(row)};
166template <std::
integral row_index_t, std::
integral col_index_t>
167 requires std::common_with<row_index_t, col_index_t>
168matrix_index(row_index_type<row_index_t>, column_index_type<col_index_t>)
169 -> matrix_index<std::common_type_t<row_index_t, col_index_t>>;
172template <simd_index index_t>
173matrix_index(row_index_type<index_t>, column_index_type<index_t>) -> matrix_index<index_t>;
178using matrix_coordinate = matrix_index<size_t>;
184template <simd_index index_t>
185using simd_matrix_coordinate = matrix_index<index_t>;
189using matrix_offset = matrix_index<std::ptrdiff_t>;
Provides algorithms to modify seqan3::simd::simd_type.
Provides basic data structure for strong types.
Provides concepts that do not have equivalents in C++20.
Provides seqan3::simd::simd_concept.