25template <
typename alignment_configuration_t>
68 template <
typename affine_cell_t>
70 affine_cell_t previous_cell,
71 score_type const sequence_score)
const noexcept
73 diagonal_score += sequence_score;
75 score_type vertical_score = previous_cell.vertical_score();
78 diagonal_score = (diagonal_score < vertical_score)
79 ? (best_trace = previous_cell.vertical_trace(), vertical_score)
80 : (best_trace |= previous_cell.vertical_trace(), diagonal_score);
82 (diagonal_score < horizontal_score)
85 : (best_trace |= previous_cell.horizontal_trace(), diagonal_score);
100 return {{diagonal_score, horizontal_score, vertical_score},
101 {best_trace, next_horizontal_trace, next_vertical_trace}};
114 template <
typename affine_cell_t>
124 template <
typename affine_cell_t>
A proxy for an affine score matrix cell.
Definition: affine_cell_proxy.hpp:117
decltype(auto) horizontal_score() &noexcept
Access the horizontal score of the wrapped score matrix cell.
Definition: affine_cell_proxy.hpp:213
decltype(auto) vertical_trace() &noexcept
Access the vertical score of the wrapped score matrix cell.
Definition: affine_cell_proxy.hpp:310
decltype(auto) horizontal_trace() &noexcept
Access the horizontal score of the wrapped score matrix cell.
Definition: affine_cell_proxy.hpp:285
Implements the alignment recursion function for the alignment algorithm using affine gap costs.
Definition: policy_affine_gap_recursion.hpp:45
bool first_row_is_free
Initialisation state of the first row of the alignment.
Definition: policy_affine_gap_recursion.hpp:64
affine_cell_type initialise_first_row_cell(affine_cell_t previous_cell) const noexcept
Initialises the first cell of a alignment matrix column.
Definition: policy_affine_gap_recursion.hpp:197
affine_cell_type initialise_origin_cell() const noexcept
Initialises the first cell of the alignment matrix in the top left corner of the matrix.
Definition: policy_affine_gap_recursion.hpp:152
score_type gap_extension_score
The score for a gap extension.
Definition: policy_affine_gap_recursion.hpp:59
typename traits_type::score_type score_type
The configured score type.
Definition: policy_affine_gap_recursion.hpp:52
score_type gap_open_score
The score for a gap opening including the gap extension.
Definition: policy_affine_gap_recursion.hpp:61
bool first_column_is_free
Initialisation state of the first column of the alignment.
Definition: policy_affine_gap_recursion.hpp:66
std::tuple< score_type, score_type, score_type > affine_score_tuple_t
The internal tuple storing the scores of an affine cell.
Definition: policy_affine_gap_recursion.hpp:54
affine_cell_type initialise_first_column_cell(affine_cell_t previous_cell) const noexcept
Initialises a cell of the first alignment matrix column.
Definition: policy_affine_gap_recursion.hpp:174
alignment_configuration_traits< alignment_configuration_t > traits_type
The configuration traits type.
Definition: policy_affine_gap_recursion.hpp:48
Implements the alignment recursion function for the alignment algorithm using affine gap costs with t...
Definition: policy_affine_gap_with_trace_recursion.hpp:27
policy_affine_gap_with_trace_recursion(policy_affine_gap_with_trace_recursion const &)=default
Defaulted.
policy_affine_gap_with_trace_recursion(alignment_configuration_t const &config)
Defaulted.
Definition: policy_affine_gap_with_trace_recursion.hpp:63
~policy_affine_gap_with_trace_recursion()=default
Defaulted.
policy_affine_gap_with_trace_recursion & operator=(policy_affine_gap_with_trace_recursion const &)=default
Defaulted.
bool first_row_is_free
Initialisation state of the first row of the alignment.
Definition: policy_affine_gap_recursion.hpp:64
policy_affine_gap_with_trace_recursion(policy_affine_gap_with_trace_recursion &&)=default
Defaulted.
typename traits_type::trace_type trace_type
The trace type to use.
Definition: policy_affine_gap_with_trace_recursion.hpp:38
affine_cell_type initialise_first_column_cell(affine_cell_t previous_cell) const noexcept
Initialises a cell of the first alignment matrix column.
Definition: policy_affine_gap_with_trace_recursion.hpp:115
score_type gap_extension_score
The score for a gap extension.
Definition: policy_affine_gap_recursion.hpp:59
typename traits_type::score_type score_type
The configured score type.
Definition: policy_affine_gap_recursion.hpp:52
affine_cell_type initialise_origin_cell() const noexcept
Initialises the first cell of the alignment matrix in the top left corner of the matrix.
Definition: policy_affine_gap_with_trace_recursion.hpp:105
score_type gap_open_score
The score for a gap opening including the gap extension.
Definition: policy_affine_gap_recursion.hpp:61
bool first_column_is_free
Initialisation state of the first column of the alignment.
Definition: policy_affine_gap_recursion.hpp:66
affine_cell_type compute_inner_cell(score_type diagonal_score, affine_cell_t previous_cell, score_type const sequence_score) const noexcept
Computes an inner cell of the alignment matrix.
Definition: policy_affine_gap_with_trace_recursion.hpp:69
policy_affine_gap_with_trace_recursion()=default
Defaulted.
affine_cell_type initialise_first_row_cell(affine_cell_t previous_cell) const noexcept
Initialises the first cell of a alignment matrix column.
Definition: policy_affine_gap_with_trace_recursion.hpp:125
policy_affine_gap_with_trace_recursion & operator=(policy_affine_gap_with_trace_recursion &&)=default
Defaulted.
trace_directions
The possible directions a trace can have. The values can be combined by the logical |-operator.
Definition: trace_directions.hpp:29
@ up
Trace comes from the above entry.
@ left
Trace comes from the left entry.
@ diagonal
Trace comes from the diagonal entry.
@ carry_up_open
Carry bit for the last up open even if it is not the maximum value.
@ left_open
Trace comes from the left entry, while opening the gap.
@ up_open
Trace comes from the above entry, while opening the gap.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::detail::policy_affine_gap_recursion.
std::conditional_t< is_vectorised, simd_type_t< original_score_type >, trace_directions > trace_type
The trace directions type for the alignment algorithm.
Definition: alignment/pairwise/detail/type_traits.hpp:138