SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
two_dimensional_matrix_iterator_concept.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
13#pragma once
14
15#include <type_traits>
16
18#include <seqan3/std/concepts>
19#include <seqan3/std/iterator>
20
21namespace seqan3::detail
22{
23
93template <typename iter_t>
94SEQAN3_CONCEPT two_dimensional_matrix_iterator =
95 std::random_access_iterator<iter_t> &&
97 {
98 { it += offset };
99 { it + offset };
100 { offset + it };
101 { cit + offset };
102 { offset + cit };
103 { it -= offset };
104 { it - offset };
105 { cit - offset };
106 { it.coordinate() };
107 { cit.coordinate() };
108
115 SEQAN3_RETURN_TYPE_CONSTRAINT(it.coordinate(), std::same_as, matrix_coordinate);
116 SEQAN3_RETURN_TYPE_CONSTRAINT(cit.coordinate(), std::same_as, matrix_coordinate);
117 };
119} // namespace seqan3::detail
The <concepts> header from C++20's standard library.
@ offset
Sequence (seqan3::field::seq) relative start position (0-based), unsigned value.
The <iterator> header from C++20's standard library.
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
#define SEQAN3_RETURN_TYPE_CONSTRAINT(expression, concept_name,...)
Same as writing {expression} -> concept_name<type1[, ...]> in a concept definition.
Definition: platform.hpp:57