16 #include <type_traits>
22 namespace seqan3::detail
31 SEQAN3_CONCEPT arithmetic_or_simd =
arithmetic<t> || simd_concept<t>;
47 std::tuple_size_v<t> == 3 &&
48 arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<0, t>>> &&
49 arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<1, t>>> &&
50 arithmetic_or_simd<std::remove_reference_t<std::tuple_element_t<2, t>>>;
65 template <affine_score_cell tuple_t>
67 requires (std::tuple_size_v<tuple_t> == 3)
69 class affine_cell_proxy : public tuple_t
75 affine_cell_proxy()=
default;
76 affine_cell_proxy(affine_cell_proxy
const &) =
default;
77 affine_cell_proxy(affine_cell_proxy &&) =
default;
78 affine_cell_proxy & operator=(affine_cell_proxy
const &) =
default;
79 affine_cell_proxy & operator=(affine_cell_proxy &&) =
default;
80 ~affine_cell_proxy() =
default;
83 using tuple_t::tuple_t;
84 using tuple_t::operator=;
91 decltype(
auto) best_score() & noexcept {
return get_score_impl<0>(*
this); }
94 decltype(
auto) best_score() const & noexcept {
return get_score_impl<0>(*
this); }
96 decltype(
auto) best_score() && noexcept {
return get_score_impl<0>(
std::move(*
this)); }
98 decltype(
auto) best_score() const && noexcept
100 using return_t = std::tuple_element_t<0, tuple_t>;
101 return static_cast<return_t
const &&
>(get_score_impl<0>(
std::move(*
this)));
105 decltype(
auto) horizontal_score() & noexcept {
return get_score_impl<1>(*
this); }
107 decltype(
auto) horizontal_score() const & noexcept {
return get_score_impl<1>(*
this); }
109 decltype(
auto) horizontal_score() && noexcept {
return get_score_impl<1>(
std::move(*
this)); }
111 decltype(
auto) horizontal_score() const && noexcept
113 using return_t = std::tuple_element_t<1, tuple_t>;
114 return static_cast<return_t
const &&
>(get_score_impl<1>(
std::move(*
this)));
118 decltype(
auto) vertical_score() & noexcept {
return get_score_impl<2>(*
this); }
120 decltype(
auto) vertical_score() const & noexcept {
return get_score_impl<2>(*
this); }
122 decltype(
auto) vertical_score() && noexcept {
return get_score_impl<2>(
std::move(*
this)); }
124 decltype(
auto) vertical_score() const && noexcept
126 using return_t = std::tuple_element_t<2, tuple_t>;
127 return static_cast<return_t
const &&
>(get_score_impl<2>(
std::move(*
this)));
140 template <
size_t index,
typename this_t>
144 static constexpr decltype(auto) get_score_impl(this_t && me) noexcept
148 return get<index>(std::forward<this_t>(me));
156 template <
typename tuple_t>
157 struct tuple_size<
seqan3::detail::affine_cell_proxy<tuple_t>> : tuple_size<tuple_t>
160 template <
size_t index,
typename tuple_t>
161 struct tuple_element<index,
seqan3::detail::affine_cell_proxy<tuple_t>> : tuple_element<index, tuple_t>