47 #include <meta/meta.hpp> 49 #include <range/v3/view/bounded.hpp> 50 #include <range/v3/view/transform.hpp> 51 #include <range/v3/view/single.hpp> 71 template <std::ranges::InputRange sequence_t,
typename alignment_config_t>
72 requires detail::is_algorithm_configuration_v<remove_cvref_t<alignment_config_t>> &&
73 tuple_like_concept<value_type_t<std::ranges::iterator_t<std::remove_reference_t<sequence_t>>>>
74 constexpr
auto align_pairwise(sequence_t && seq, alignment_config_t && config)
77 "Expects exactly two sequences for pairwise alignments.");
79 auto dispatch_execution = [tpl = std::forward_as_tuple(std::forward<sequence_t>(seq))](
auto && cfg)
88 auto align_rng = std::forward<std::tuple_element_t<0, decltype(tpl)>>(std::get<0>(tpl)) |
view::persist;
89 detail::alignment_selector<value_type_t<decltype(align_rng)>,
90 std::remove_reference_t<decltype(cfg)>> selector{cfg};
91 using exec_type = detail::alignment_executor_two_way<decltype(align_rng), decltype(selector)>;
92 return alignment_range<exec_type>{align_rng, selector};
97 return detail::apply_deferred_configs(dispatch_execution, std::forward<alignment_config_t>(config));
101 template <tuple_like_concept seq_t,
102 typename alignment_config_t>
103 requires detail::is_algorithm_configuration_v<remove_cvref_t<alignment_config_t>>
104 constexpr
auto align_pairwise(seq_t && seq, alignment_config_t && config)
106 static_assert(std::tuple_size_v<std::remove_reference_t<seq_t>> == 2,
107 "Expects exactly two sequences for pairwise alignments.");
110 return align_pairwise(ranges::view::single(std::forward<seq_t>(seq)) | ranges::view::bounded,
111 std::forward<alignment_config_t>(config));
Meta-header for the pairwise execution submodule .
Meta-header for the alignment configuration module .
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:58
::ranges::iterator_t iterator_t
Alias for ranges::iterator_t. Obtains the iterator type of a range.
Definition: ranges:225
Adaptations of concepts from the Ranges TS.
Provides seqan3::detail::alignment_selector.
auto constexpr persist
A view adaptor that wraps rvalue references of non-views.
Definition: persist.hpp:315
Provides C++20 additions to the type_traits header.
Provides various metafunctions on generic types.
Provides seqan3::align_result.
Meta-Header for components of the algorithm submodule.
Provides seqan3::view::persist.