SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
trace_iterator.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
13
14namespace seqan3::detail
15{
16
28template <two_dimensional_matrix_iterator matrix_iter_t>
29class trace_iterator : public trace_iterator_base<trace_iterator<matrix_iter_t>, matrix_iter_t>
30{
31private:
32 static_assert(std::same_as<std::iter_value_t<matrix_iter_t>, trace_directions>,
33 "Value type of the underlying iterator must be trace_directions.");
34
37
38public:
42 constexpr trace_iterator() = default;
43 constexpr trace_iterator(trace_iterator const &) = default;
44 constexpr trace_iterator(trace_iterator &&) = default;
45 constexpr trace_iterator & operator=(trace_iterator const &) = default;
46 constexpr trace_iterator & operator=(trace_iterator &&) = default;
47 ~trace_iterator() = default;
48
52 explicit constexpr trace_iterator(matrix_iter_t const matrix_iter) noexcept : base_t{matrix_iter}
53 {}
54
64 template <two_dimensional_matrix_iterator other_matrix_iter_t>
65 requires std::constructible_from<matrix_iter_t, other_matrix_iter_t>
66 constexpr trace_iterator(trace_iterator<other_matrix_iter_t> const other) noexcept : base_t{other}
67 {}
69};
70
71} // namespace seqan3::detail
A CRTP-base class for trace iterator implementations for the alignment algorithms.
Definition trace_iterator_base.hpp:61
matrix_iter_t matrix_iter
The underlying matrix iterator.
Definition trace_iterator_base.hpp:283
A trace iterator an unbanded trace matrix.
Definition trace_iterator.hpp:30
constexpr trace_iterator(trace_iterator const &)=default
Defaulted.
~trace_iterator()=default
Defaulted.
constexpr trace_iterator & operator=(trace_iterator const &)=default
Defaulted.
constexpr trace_iterator(trace_iterator< other_matrix_iter_t > const other) noexcept
Constructs from the underlying trace matrix iterator indicating the start of the trace path.
Definition trace_iterator.hpp:66
constexpr trace_iterator & operator=(trace_iterator &&)=default
Defaulted.
constexpr trace_iterator(trace_iterator &&)=default
Defaulted.
constexpr trace_iterator()=default
Defaulted.
constexpr trace_iterator(matrix_iter_t const matrix_iter) noexcept
Constructs from the underlying trace matrix iterator indicating the start of the trace path.
Definition trace_iterator.hpp:52
trace_directions
The possible directions a trace can have. The values can be combined by the logical |-operator.
Definition trace_directions.hpp:26
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides seqan3::detail::trace_iterator_base.
Hide me