25namespace seqan3::detail
44concept tracedirections_or_simd = std::same_as<std::remove_cvref_t<t>, trace_directions> || simd_concept<t>;
59concept affine_score_cell =
tuple_like<t> && std::tuple_size_v<t> == 3
60 && arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<0, t>>>
61 && arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<1, t>>>
62 && arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<2, t>>>;
77concept affine_trace_cell =
tuple_like<t> && std::tuple_size_v<t> == 3
78 && tracedirections_or_simd<std::remove_reference_t<std::tuple_element_t<0, t>>>
79 && tracedirections_or_simd<std::remove_reference_t<std::tuple_element_t<1, t>>>
80 && tracedirections_or_simd<std::remove_reference_t<std::tuple_element_t<2, t>>>;
95concept affine_score_and_trace_cell =
97 && affine_score_cell<std::tuple_element_t<0, t>> && affine_trace_cell<std::tuple_element_t<1, t>>;
114template <
typename tuple_t>
115 requires (affine_score_cell<tuple_t> || affine_score_and_trace_cell<tuple_t>)
116class affine_cell_proxy :
public tuple_t
122 using trace_cell_type =
129 affine_cell_proxy() =
default;
130 affine_cell_proxy(affine_cell_proxy
const &) =
default;
131 affine_cell_proxy(affine_cell_proxy &&) =
default;
132 affine_cell_proxy & operator=(affine_cell_proxy
const &) =
default;
133 affine_cell_proxy & operator=(affine_cell_proxy &&) =
default;
134 ~affine_cell_proxy() =
default;
137 using tuple_t::tuple_t;
140 template <
typename other_tuple_t>
141 requires std::constructible_from<tuple_t, other_tuple_t &&>
142 explicit affine_cell_proxy(other_tuple_t && other) : tuple_t{
std::
forward<other_tuple_t>(other)}
146 template <
typename other_tuple_t>
147 requires std::constructible_from<tuple_t, other_tuple_t const &>
148 explicit affine_cell_proxy(affine_cell_proxy<other_tuple_t>
const & other) :
149 tuple_t{static_cast<other_tuple_t const &>(other)}
153 template <
typename other_tuple_t>
154 requires std::constructible_from<tuple_t, other_tuple_t>
155 explicit affine_cell_proxy(affine_cell_proxy<other_tuple_t> && other) :
156 tuple_t{static_cast<other_tuple_t &&>(
std::
move(other))}
160 template <
typename other_tuple_t>
161 requires std::assignable_from<tuple_t &, other_tuple_t &&>
162 affine_cell_proxy & operator=(other_tuple_t && other)
164 as_base() = std::forward<other_tuple_t>(other);
169 template <
typename other_tuple_t>
170 requires std::assignable_from<tuple_t &, other_tuple_t const &>
171 affine_cell_proxy & operator=(affine_cell_proxy<other_tuple_t>
const & other)
173 as_base() =
static_cast<other_tuple_t
const &
>(other);
178 template <
typename other_tuple_t>
179 requires std::assignable_from<tuple_t &, other_tuple_t>
180 affine_cell_proxy & operator=(affine_cell_proxy<other_tuple_t> && other)
182 as_base() =
static_cast<other_tuple_t &&
>(std::move(other));
192 decltype(
auto) best_score() &
noexcept
194 return get_score_impl<0>(*
this);
197 decltype(
auto) best_score()
const &
noexcept
199 return get_score_impl<0>(*
this);
202 decltype(
auto) best_score() &&
noexcept
204 return get_score_impl<0>(std::move(*
this));
207 decltype(
auto) best_score()
const &&
noexcept
209 return get_score_impl<0>(std::move(*
this));
213 decltype(
auto) horizontal_score() &
noexcept
215 return get_score_impl<1>(*
this);
218 decltype(
auto) horizontal_score()
const &
noexcept
220 return get_score_impl<1>(*
this);
223 decltype(
auto) horizontal_score() &&
noexcept
225 return get_score_impl<1>(std::move(*
this));
228 decltype(
auto) horizontal_score()
const &&
noexcept
230 return get_score_impl<1>(std::move(*
this));
234 decltype(
auto) vertical_score() &
noexcept
236 return get_score_impl<2>(*
this);
239 decltype(
auto) vertical_score()
const &
noexcept
241 return get_score_impl<2>(*
this);
244 decltype(
auto) vertical_score() &&
noexcept
246 return get_score_impl<2>(std::move(*
this));
249 decltype(
auto) vertical_score()
const &&
noexcept
251 return get_score_impl<2>(std::move(*
this));
260 decltype(
auto) best_trace() &
noexcept
261 requires affine_score_and_trace_cell<tuple_t>
263 return get_trace_impl<0>(*
this);
266 decltype(
auto) best_trace()
const &
noexcept
267 requires affine_score_and_trace_cell<tuple_t>
269 return get_trace_impl<0>(*
this);
272 decltype(
auto) best_trace() &&
noexcept
273 requires affine_score_and_trace_cell<tuple_t>
275 return get_trace_impl<0>(std::move(*
this));
278 decltype(
auto) best_trace()
const &&
noexcept
279 requires affine_score_and_trace_cell<tuple_t>
281 return get_trace_impl<0>(std::move(*
this));
285 decltype(
auto) horizontal_trace() &
noexcept
286 requires affine_score_and_trace_cell<tuple_t>
288 return get_trace_impl<1>(*
this);
291 decltype(
auto) horizontal_trace()
const &
noexcept
292 requires affine_score_and_trace_cell<tuple_t>
294 return get_trace_impl<1>(*
this);
297 decltype(
auto) horizontal_trace() &&
noexcept
298 requires affine_score_and_trace_cell<tuple_t>
300 return get_trace_impl<1>(std::move(*
this));
303 decltype(
auto) horizontal_trace()
const &&
noexcept
304 requires affine_score_and_trace_cell<tuple_t>
306 return get_trace_impl<1>(std::move(*
this));
310 decltype(
auto) vertical_trace() &
noexcept
311 requires affine_score_and_trace_cell<tuple_t>
313 return get_trace_impl<2>(*
this);
316 decltype(
auto) vertical_trace()
const &
noexcept
317 requires affine_score_and_trace_cell<tuple_t>
319 return get_trace_impl<2>(*
this);
322 decltype(
auto) vertical_trace() &&
noexcept
323 requires affine_score_and_trace_cell<tuple_t>
325 return get_trace_impl<2>(std::move(*
this));
328 decltype(
auto) vertical_trace()
const &&
noexcept
329 requires affine_score_and_trace_cell<tuple_t>
331 return get_trace_impl<2>(std::move(*
this));
344 template <
size_t index,
typename this_t>
346 static constexpr decltype(
auto) get_score_impl(this_t && me)
noexcept
350 if constexpr (affine_score_cell<tuple_t>)
351 return get<index>(std::forward<this_t>(me));
353 return get<index>(get<0>(std::forward<this_t>(me)));
364 template <
size_t index,
typename this_t>
365 requires (index < 3 && affine_score_and_trace_cell<tuple_t>)
366 static constexpr decltype(
auto) get_trace_impl(this_t && me)
noexcept
370 return get<index>(get<1>(std::forward<this_t>(me)));
374 tuple_t & as_base() &
noexcept
376 return static_cast<tuple_t &
>(*this);
384template <
typename tuple_t>
385 requires (seqan3::detail::affine_score_cell<tuple_t> || seqan3::detail::affine_score_and_trace_cell<tuple_t>)
386struct tuple_size<seqan3::detail::affine_cell_proxy<tuple_t>> :
public tuple_size<tuple_t>
389template <
size_t index,
typename tuple_t>
390 requires (seqan3::detail::affine_score_cell<tuple_t> || seqan3::detail::affine_score_and_trace_cell<tuple_t>)
391struct tuple_element<index, seqan3::detail::affine_cell_proxy<tuple_t>> :
public tuple_element<index, tuple_t>
Provides seqan3::detail::empty_type.
A type that satisfies std::is_arithmetic_v<t>.
Whether a type behaves like a tuple.
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: configuration.hpp:415
SeqAn specific customisations in the standard namespace.
Provides the declaration of seqan3::detail::trace_directions.
Provides concepts that do not have equivalents in C++20.
Provides seqan3::simd::simd_concept.
Provides seqan3::tuple_like.