16 #include <type_traits>
42 namespace seqan3::detail
61 template <
typename sequence_pairs_t>
63 requires sequence_pair_range<std::remove_reference_t<sequence_pairs_t>>
65 struct chunked_indexed_sequence_pairs
68 using type = decltype(
views::zip(std::declval<sequence_pairs_t>(), std::views::iota(0)) |
views::chunk(1));
82 template <
typename configuration_t>
84 requires is_type_specialisation_of_v<std::remove_cv_t<configuration_t>, configuration>
86 struct alignment_configuration_traits
99 template <arithmetic score_t>
100 using select_scalar_index_t = min_viable_uint_t<1ull << (bits_of<score_t> - 1)>;
103 static constexpr
auto determine_alignment_result_type() noexcept
105 if constexpr (configuration_t::template exists<align_cfg::detail::result_type>())
107 using result_type_cfg_t =
109 decltype(seqan3::get<align_cfg::detail::result_type>(std::declval<configuration_t>()))
111 return typename result_type_cfg_t::type{};
121 static constexpr
bool is_vectorised = configuration_t::template exists<align_cfg::vectorised>();
123 static constexpr
bool is_parallel = configuration_t::template exists<align_cfg::parallel>();
125 static constexpr
bool is_global =
126 configuration_t::template exists<seqan3::align_cfg::method_global>();
128 static constexpr
bool is_local = configuration_t::template exists<seqan3::align_cfg::method_local>();
130 static constexpr
bool is_banded = configuration_t::template exists<align_cfg::band_fixed_size>();
132 static constexpr
bool is_debug = configuration_t::template exists<detail::debug_mode>();
134 static constexpr
bool is_one_way_execution = configuration_t::template exists<align_cfg::on_result>();
136 using scoring_scheme_type = decltype(get<align_cfg::scoring_scheme>(std::declval<configuration_t>()).scheme);
138 using scoring_scheme_alphabet_type =
typename scoring_scheme_type::alphabet_type;
141 std::declval<configuration_t>().get_or(align_cfg::score_type<int32_t>{}))>::type;
147 using alignment_result_type = decltype(determine_alignment_result_type());
150 simd_type_t<select_scalar_index_t<original_score_type>>,
153 using matrix_coordinate_type = lazy_conditional_t<is_vectorised,
154 lazy<simd_matrix_coordinate, matrix_index_type>,
158 static constexpr
size_t alignments_per_vector = [] () constexpr
160 if constexpr (is_vectorised)
161 return simd_traits<score_type>::length;
166 static constexpr
bool compute_score = configuration_t::template exists<align_cfg::output_score>();
168 static constexpr
bool compute_end_positions =
169 configuration_t::template exists<align_cfg::output_end_position>();
171 static constexpr
bool compute_begin_positions =
172 configuration_t::template exists<align_cfg::output_begin_position>();
174 static constexpr
bool compute_sequence_alignment =
175 configuration_t::template exists<align_cfg::output_alignment>();
177 static constexpr
bool output_sequence1_id =
178 configuration_t::template exists<align_cfg::output_sequence1_id>();
180 static constexpr
bool output_sequence2_id =
181 configuration_t::template exists<align_cfg::output_sequence2_id>();
183 static constexpr
bool has_output_configuration = compute_score ||
184 compute_end_positions ||
185 compute_begin_positions ||
186 compute_sequence_alignment ||
187 output_sequence1_id ||
190 static constexpr
bool requires_trace_information = compute_begin_positions || compute_sequence_alignment;
202 template <
typename function_t>
203 struct alignment_function_traits
206 using sequence_input_type =
typename function_traits<function_t>::template argument_type_at<0>;
208 using callback_type =
typename function_traits<function_t>::template argument_type_at<1>;
210 using alignment_result_type =
typename function_traits<callback_type>::template argument_type_at<0>;
Provides seqan3::detail::align_config_band.
Provides seqan3::align_cfg::detail::debug.
Provides global and local alignment configurations.
Provides seqan3::align_cfg::on_result.
Provides configuration for alignment output.
Provides seqan3::align_cfg::parallel configuration.
Provides seqan3::align_cfg::detail::result_type.
Provides alignment configuration seqan3::align_cfg::score_type.
Provides seqan3::align_cfg::scoring_scheme.
Provides seqan3::align_cfg::vectorised configuration.
Provides concepts needed internally for the alignment algorithms.
Provides utility functions for bit twiddling.
Provides seqan3::configuration and utility functions.
Provides type traits for working with templates.
Provides seqan3::detail::empty_type.
Provides various type traits for use on functions.
constexpr auto chunk
A chunk view.
Definition: chunk.hpp:29
constexpr auto zip
A zip view.
Definition: zip.hpp:29
Provides lazy template instantiation traits.
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
Adaptations of concepts from the Ranges TS.
Provides the declaration of seqan3::detail::trace_directions.
Provides seqan3::simd::simd_type.
Provides seqan3::simd::simd_traits.
Provides seqan3::views::chunk.
Provides seqan3::views::zip.