30 struct default_affine_init_traits
44 template <
typename derived_t,
typename traits_type = default_affine_init_traits>
45 class affine_gap_init_policy
55 constexpr affine_gap_init_policy() noexcept = default;
56 constexpr affine_gap_init_policy(affine_gap_init_policy const &) noexcept = default;
57 constexpr affine_gap_init_policy(affine_gap_init_policy &&) noexcept = default;
58 constexpr affine_gap_init_policy & operator=(affine_gap_init_policy const &) noexcept = default;
59 constexpr affine_gap_init_policy & operator=(affine_gap_init_policy &&) noexcept = default;
60 ~affine_gap_init_policy() noexcept = default;
69 template <typename cell_t, typename cache_t>
70 constexpr auto init_origin_cell(cell_t && current_cell, cache_t & cache) const noexcept
74 auto & [main_score, hz_score, hz_trace] = get<0>(current_cell);
75 auto & prev_cell = get<0>(cache);
76 auto & vt_score = get<1>(prev_cell);
79 get<2>(current_cell) = trace_directions::none;
82 if constexpr (traits_type::free_second_leading_t::value)
85 get<2>(prev_cell) = trace_directions::none;
89 vt_score = get<1>(cache);
90 get<2>(prev_cell) = trace_directions::up_open;
94 if constexpr (traits_type::free_first_leading_t::value)
97 hz_trace = trace_directions::none;
101 hz_score = get<1>(cache);
102 hz_trace = trace_directions::left_open;
112 template <
typename cell_t,
typename cache_t>
113 constexpr
auto init_column_cell(cell_t && current_cell, cache_t & cache)
const noexcept
117 auto & [main_score, hz_score, hz_trace] = get<0>(current_cell);
118 auto & prev_cell = get<0>(cache);
119 auto & vt_score = get<1>(prev_cell);
121 main_score = vt_score;
122 get<2>(current_cell) = get<2>(prev_cell);
125 if constexpr (traits_type::free_second_leading_t::value)
128 get<2>(prev_cell) = trace_directions::none;
132 vt_score += get<2>(cache);
133 get<2>(prev_cell) = trace_directions::up;
136 hz_score = main_score + get<1>(cache);
137 hz_trace = trace_directions::left_open;
146 template <
typename cell_t,
typename cache_t>
147 constexpr
auto init_row_cell(cell_t && current_cell, cache_t & cache)
const noexcept
151 auto & [main_score, hz_score, hz_trace] = get<0>(current_cell);
152 auto & [prev_score, vt_score, vt_trace] = get<0>(cache);
154 prev_score = main_score;
155 main_score = hz_score;
156 get<2>(current_cell) = hz_trace;
158 vt_score += main_score + get<1>(cache);
159 vt_trace = trace_directions::up_open;
161 if constexpr (traits_type::free_first_leading_t::value)
164 hz_trace = trace_directions::none;
168 hz_score += get<2>(cache);
169 hz_trace = trace_directions::left;
Provides the declaration of seqan3::detail::trace_directions.
Definition: aligned_sequence_concept.hpp:35
auto const get
A view calling std::get on each element in a range.
Definition: get.hpp:66