22template <
typename alignment_configuration_t>
65 template <
typename affine_cell_t>
67 affine_cell_t previous_cell,
68 score_type const sequence_score)
const noexcept
70 diagonal_score += sequence_score;
72 score_type vertical_score = previous_cell.vertical_score();
75 diagonal_score = (diagonal_score < vertical_score)
76 ? (best_trace = previous_cell.vertical_trace(), vertical_score)
77 : (best_trace |= previous_cell.vertical_trace(), diagonal_score);
79 (diagonal_score < horizontal_score)
82 : (best_trace |= previous_cell.horizontal_trace(), diagonal_score);
97 return {{diagonal_score, horizontal_score, vertical_score},
98 {best_trace, next_horizontal_trace, next_vertical_trace}};
111 template <
typename affine_cell_t>
121 template <
typename affine_cell_t>
A proxy for an affine score matrix cell.
Definition affine_cell_proxy.hpp:114
decltype(auto) horizontal_score() &noexcept
Access the horizontal score of the wrapped score matrix cell.
Definition affine_cell_proxy.hpp:210
decltype(auto) vertical_trace() &noexcept
Access the vertical score of the wrapped score matrix cell.
Definition affine_cell_proxy.hpp:307
decltype(auto) horizontal_trace() &noexcept
Access the horizontal score of the wrapped score matrix cell.
Definition affine_cell_proxy.hpp:282
Implements the alignment recursion function for the alignment algorithm using affine gap costs.
Definition policy_affine_gap_recursion.hpp:42
bool first_row_is_free
Initialisation state of the first row of the alignment.
Definition policy_affine_gap_recursion.hpp:61
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:194
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:149
score_type gap_extension_score
The score for a gap extension.
Definition policy_affine_gap_recursion.hpp:56
typename traits_type::score_type score_type
The configured score type.
Definition policy_affine_gap_recursion.hpp:49
score_type gap_open_score
The score for a gap opening including the gap extension.
Definition policy_affine_gap_recursion.hpp:58
bool first_column_is_free
Initialisation state of the first column of the alignment.
Definition policy_affine_gap_recursion.hpp:63
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:51
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:171
alignment_configuration_traits< alignment_configuration_t > traits_type
The configuration traits type.
Definition policy_affine_gap_recursion.hpp:45
Implements the alignment recursion function for the alignment algorithm using affine gap costs with t...
Definition policy_affine_gap_with_trace_recursion.hpp:24
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:60
~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:61
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:35
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:112
score_type gap_extension_score
The score for a gap extension.
Definition policy_affine_gap_recursion.hpp:56
typename traits_type::score_type score_type
The configured score type.
Definition policy_affine_gap_recursion.hpp:49
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:102
score_type gap_open_score
The score for a gap opening including the gap extension.
Definition policy_affine_gap_recursion.hpp:58
bool first_column_is_free
Initialisation state of the first column of the alignment.
Definition policy_affine_gap_recursion.hpp:63
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:66
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:122
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:26
@ 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:26
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:135