SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Stores the current optimum of the alignment algorithm. More...
#include <seqan3/alignment/matrix/detail/alignment_optimum.hpp>
Public Types | |
using | index_t = IMPLEMENTATION_DEFINED |
The index type used to store the alignment coordinates of the optimum. | |
Public Member Functions | |
template<typename column_index_t , typename row_index_t > | |
void | update_if_new_optimal_score (score_t const &compare_score, column_index_type< column_index_t > column_index, row_index_type< row_index_t > row_index) noexcept |
Compares the score with the given score and updates the optimum if the new score is bigger than the current one. | |
Public Attributes | |
index_t | column_index {} |
The index of the alignment matrix column. | |
index_t | row_index {} |
The index of the alignment matrix row. | |
score_t | score = IMPLEMENTATION_DEFINED |
The optimal score whose initialisation is implementation defined. | |
Related Symbols | |
(Note that these are not member symbols.) | |
Type deduction guides | |
alignment_optimum () -> alignment_optimum< int32_t > | |
Default constructed objects deduce to int32_t . | |
template<typename column_index_t , typename row_index_t , typename score_t > | |
alignment_optimum (column_index_t, row_index_t, score_t) -> alignment_optimum< score_t > | |
Construction from column index, row index and the score deduces the score type. | |
Stores the current optimum of the alignment algorithm.
score_t | The type of the tracked alignment score; must model either seqan3::arithmetic or seqan3::simd_concept. |
Stores the optimal score of the alignment computation and the corresponding indices of the cell with the optimal score within the alignment matrix. In case the optimum is used for the vectorised alignment computation this optimum stores the optimal scores and the respective cells as simd vectors.
|
noexcept |
Compares the score with the given score and updates the optimum if the new score is bigger than the current one.
column_index_t | The index type for the column index; must model std::unsigned_integral. |
row_index_t | The index type for the row index; must model std::unsigned_integral. |
[in] | compare_score | The new score to compare with. |
[in] | column_index | The respective column index of the alignment matrix. |
[in] | row_index | The respective row index of the alignment matrix. |
Only updates the current optimum if the new score is greater than the current one. Note in the case of computing a vectorised alignment only the positions of the simd vector are updated whose score is greater than the current scores.