21 namespace seqan3::detail
38 template <
typename config_t,
typename traits_t>
39 class edit_distance_algorithm
43 using configuration_traits_type = alignment_configuration_traits<config_t>;
45 using alignment_result_type =
typename configuration_traits_type::alignment_result_type;
47 static_assert(!std::same_as<alignment_result_type, empty_type>,
"Alignment result type was not configured.");
53 constexpr edit_distance_algorithm() =
default;
54 constexpr edit_distance_algorithm(edit_distance_algorithm
const &) =
default;
55 constexpr edit_distance_algorithm(edit_distance_algorithm &&) =
default;
56 constexpr edit_distance_algorithm & operator=(edit_distance_algorithm
const &) =
default;
57 constexpr edit_distance_algorithm & operator=(edit_distance_algorithm &&) =
default;
58 ~edit_distance_algorithm() =
default;
71 constexpr edit_distance_algorithm(config_t
const & cfg) : cfg_ptr{new config_t(cfg)}
92 template <indexed_sequence_pair_range indexed_sequence_pairs_t,
typename callback_t>
94 requires std::invocable<callback_t, alignment_result_type>
96 constexpr
void operator()(indexed_sequence_pairs_t && indexed_sequence_pairs, callback_t && callback)
100 for (
auto && [sequence_pair, index] : indexed_sequence_pairs)
101 compute_single_pair(index,
102 get<0>(sequence_pair),
103 get<1>(sequence_pair),
104 std::forward<callback_t>(callback));
119 template <std::ranges::forward_range first_range_t, std::ranges::forward_range second_range_t,
typename callback_t>
120 constexpr
void compute_single_pair(
size_t const idx,
121 first_range_t && first_range,
122 second_range_t && second_range,
123 callback_t && callback)
125 using edit_traits = default_edit_distance_trait_type<first_range_t,
128 typename traits_t::is_semi_global_type>;
129 edit_distance_unbanded algo{first_range, second_range, *cfg_ptr, edit_traits{}};
Provides seqan3::align_cfg::edit_scheme.
Provides concepts needed internally for the alignment algorithms.
Provides a pairwise alignment algorithm for edit distance but without band.
constexpr auto get
A view calling get on each element in a range.
Definition: elements.hpp:114