SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
two_dimensional_matrix_iterator_concept.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2025 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 { it += offset };
95 { it + offset };
96 { offset + it };
97 { cit + offset };
98 { offset + cit };
99 { it -= offset };
100 { it - offset };
101 { cit - offset };
102 { it.coordinate() };
103 { cit.coordinate() };
104
105 { it += offset } -> std::same_as<std::remove_reference_t<iter_t> &>;
106 { it + offset } -> std::same_as<std::remove_reference_t<iter_t>>;
107 { offset + it } -> std::same_as<std::remove_reference_t<iter_t>>;
108 { it -= offset } -> std::same_as<std::remove_reference_t<iter_t> &>;
109 { it - offset } -> std::same_as<std::remove_reference_t<iter_t>>;
110 { cit - offset } -> std::same_as<std::remove_reference_t<iter_t>>;
111 { it.coordinate() } -> std::same_as<matrix_coordinate>;
112 { cit.coordinate() } -> std::same_as<matrix_coordinate>;
113 };
115
116// Workaround for https://github.com/doxygen/doxygen/issues/9379
117#if SEQAN3_DOXYGEN_ONLY(1) 0
118template <typename iter_t>
119class two_dimensional_matrix_iterator
120{};
121#endif
122
123} // 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