SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
two_dimensional_matrix_iterator_concept.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <concepts>
13#include <iterator>
14#include <type_traits>
15
17
18namespace seqan3::detail
19{
20
90template <typename iter_t>
91concept two_dimensional_matrix_iterator =
92 std::random_access_iterator<iter_t>
93 && requires (std::remove_reference_t<iter_t> it, std::remove_reference_t<iter_t> const cit, matrix_offset offset) {
94 {
95 it += offset
96 };
97 {
98 it + offset
99 };
100 {
101 offset + it
102 };
103 {
104 cit + offset
105 };
106 {
107 offset + cit
108 };
109 {
110 it -= offset
111 };
112 {
113 it - offset
114 };
115 {
116 cit - offset
117 };
118 {
119 it.coordinate()
120 };
121 {
122 cit.coordinate()
123 };
124
125 {
126 it += offset
127 } -> std::same_as<std::remove_reference_t<iter_t> &>;
128 {
129 it + offset
130 } -> std::same_as<std::remove_reference_t<iter_t>>;
131 {
132 offset + it
133 } -> std::same_as<std::remove_reference_t<iter_t>>;
134 {
135 it -= offset
136 } -> std::same_as<std::remove_reference_t<iter_t> &>;
137 {
138 it - offset
139 } -> std::same_as<std::remove_reference_t<iter_t>>;
140 {
141 cit - offset
142 } -> std::same_as<std::remove_reference_t<iter_t>>;
143 {
144 it.coordinate()
145 } -> std::same_as<matrix_coordinate>;
146 {
147 cit.coordinate()
148 } -> std::same_as<matrix_coordinate>;
149 };
151
152// Workaround for https://github.com/doxygen/doxygen/issues/9379
153#if SEQAN3_DOXYGEN_ONLY(1) 0
154template <typename iter_t>
155class two_dimensional_matrix_iterator
156{};
157#endif
158
159} // namespace seqan3::detail
@ offset
Sequence (seqan3::field::seq) relative start position (0-based), unsigned value.
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
Hide me