49template <
typename trace_t,
bool coordinate_only = false>
56 "Value type must either be a trace_directions object or a simd vector.");
119 template <std::ranges::forward_range first_sequence_t, std::ranges::forward_range second_sequence_t>
121 second_sequence_t && second,
122 [[maybe_unused]] trace_t
const initial_value = trace_t{})
127 if constexpr (!coordinate_only)
145 static_assert(!coordinate_only,
"Requested trace but storing the trace was disabled!");
147 using matrix_iter_t = std::ranges::iterator_t<typename matrix_base_t::pool_type>;
149 using path_t = std::ranges::subrange<trace_iterator_t, std::default_sentinel_t>;
152 throw std::invalid_argument{
"The given coordinate exceeds the matrix in vertical or horizontal direction."};
155 std::default_sentinel};
164 if constexpr (coordinate_only)
166 return alignment_column_type{
182 template <std::random_access_iterator iter_t>
185 if constexpr (coordinate_only)
187 return {*host_iter, std::ignore, std::ignore, std::ignore, std::ignore};
192 std::get<2>(*host_iter),
193 std::get<0>(*host_iter),
194 std::get<1>(*host_iter),
195 std::get<1>(*host_iter),
Provides seqan3::detail::alignment_matrix_column_major_range_base.
Provides seqan3::detail::alignment_trace_matrix_base.
Provides seqan3::detail::alignment_trace_matrix_proxy.
Implements an internal alignment coordinate that can be used as an argument to the std::ranges::iota_...
Definition: advanceable_alignment_coordinate.hpp:66
Represents a column within an alignment matrix.
Definition: alignment_matrix_column_major_range_base.hpp:78
Provides a range interface for alignment matrices.
Definition: alignment_matrix_column_major_range_base.hpp:63
std::default_sentinel_t sentinel
The type of sentinel.
Definition: alignment_matrix_column_major_range_base.hpp:480
iterator_type iterator
The type of the iterator.
Definition: alignment_matrix_column_major_range_base.hpp:478
An alignment traceback matrix storing the entire traceback matrix.
Definition: alignment_trace_matrix_full.hpp:53
advanceable_alignment_coordinate< advanceable_alignment_coordinate_state::row > coordinate_type
The coordinate type.
Definition: alignment_trace_matrix_base.hpp:45
constexpr value_type make_proxy(iter_t host_iter) noexcept
Creates the proxy value returned when dereferencing the alignment-column-iterator.
Definition: alignment_trace_matrix_full.hpp:183
constexpr alignment_trace_matrix_full(first_sequence_t &&first, second_sequence_t &&second, trace_t const initial_value=trace_t{})
Construction from two ranges.
Definition: alignment_trace_matrix_full.hpp:120
size_t size_type
The size type.
Definition: alignment_trace_matrix_base.hpp:55
constexpr alignment_trace_matrix_full(alignment_trace_matrix_full const &)=default
Defaulted.
auto trace_path(matrix_coordinate const &trace_begin)
Returns a trace path starting from the given coordinate and ending in the cell with seqan3::detail::t...
Definition: alignment_trace_matrix_full.hpp:143
typename range_base_t::iterator iterator
The type of the iterator.
Definition: alignment_trace_matrix_full.hpp:90
~alignment_trace_matrix_full()=default
Defaulted.
alignment_trace_matrix_proxy< coordinate_type, std::conditional_t< coordinate_only, detail::ignore_t const, trace_t > > value_type
The proxy type of an alignment matrix.
Definition: alignment_trace_matrix_full.hpp:86
friend range_base_t
Befriend the range base class.
Definition: alignment_trace_matrix_full.hpp:65
typename range_base_t::sentinel sentinel
The type of sentinel.
Definition: alignment_trace_matrix_full.hpp:92
constexpr alignment_trace_matrix_full & operator=(alignment_trace_matrix_full &&)=default
Defaulted.
constexpr alignment_trace_matrix_full(alignment_trace_matrix_full &&)=default
Defaulted.
constexpr alignment_column_type initialise_column(size_type const column_index) noexcept
Returns the current alignment-column at the given column_index.
Definition: alignment_trace_matrix_full.hpp:160
constexpr alignment_trace_matrix_full()=default
Defaulted.
constexpr alignment_trace_matrix_full & operator=(alignment_trace_matrix_full const &)=default
Defaulted.
A trace iterator an unbanded trace matrix.
Definition: trace_iterator.hpp:33
constexpr iterator begin() noexcept
Returns an iterator pointing to the first element of the matrix.
Definition: two_dimensional_matrix.hpp:273
constexpr simd_t iota(typename simd_traits< simd_t >::scalar_type const offset)
Fills a seqan3::simd::simd_type vector with the scalar values offset, offset+1, offset+2,...
Definition: algorithm.hpp:319
constexpr auto zip
A view adaptor that takes several views and returns tuple-like values from every i-th element of each...
Definition: zip.hpp:573
The generic simd concept.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
A crtp-base class for alignment traceback matrices.
Definition: alignment_trace_matrix_base.hpp:39
advanceable_alignment_coordinate< advanceable_alignment_coordinate_state::row > coordinate_type
The coordinate type.
Definition: alignment_trace_matrix_base.hpp:45
size_t size_type
The size type.
Definition: alignment_trace_matrix_base.hpp:55
std::vector< element_type, allocator_type > cache_left
Internal cache for the trace values to the left.
Definition: alignment_trace_matrix_base.hpp:61
size_type num_rows
The number of num_rows.
Definition: alignment_trace_matrix_base.hpp:67
element_type cache_up
Internal cache for the last trace value above.
Definition: alignment_trace_matrix_base.hpp:63
trace_t element_type
The actual element type.
Definition: alignment_trace_matrix_base.hpp:47
size_type num_cols
The number of columns.
Definition: alignment_trace_matrix_base.hpp:65
pool_type data
The linearised matrix storing the trace data in column-major-order.
Definition: alignment_trace_matrix_base.hpp:59
two_dimensional_matrix< element_type, allocator_type, matrix_major_order::column > pool_type
The type of the underlying memory pool.
Definition: alignment_trace_matrix_base.hpp:53
A proxy type for a unified access to the traceback matrix during alignment computation.
Definition: alignment_trace_matrix_proxy.hpp:36
A strong type for designated initialisation of the column index of a matrix.
Definition: matrix_coordinate.hpp:32
A representation of a location or offset within a two-dimensional matrix.
Definition: matrix_coordinate.hpp:90
Strong type for setting the row dimension of a matrix.
Definition: two_dimensional_matrix.hpp:40
A strong type for designated initialisation of the row index of a matrix.
Definition: matrix_coordinate.hpp:61
Provides seqan3::detail::trace_iterator.
Provides seqan3::views::zip.