SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
A function object that compares and possibly updates the alignment optimum with the current cell. More...
#include <seqan3/alignment/pairwise/detail/policy_optimum_tracker.hpp>
Public Member Functions | |
template<typename score_t , typename coordinate_t > requires (std::totally_ordered<score_t> && std::assignable_from<score_t &, score_t const &> && std::assignable_from<coordinate_t &, coordinate_t const &>) | |
void | operator() (score_t &optimal_score, coordinate_t &optimal_coordinate, score_t current_score, coordinate_t current_coordinate) const noexcept |
Compares and updates the optimal score-coordinate pair. | |
A function object that compares and possibly updates the alignment optimum with the current cell.
Updates the current alignment optimum with the new score and the respective coordinate if the new score compares greater or equal to the score of the current optimum.
|
inlinenoexcept |
Compares and updates the optimal score-coordinate pair.
score_t | The type of the score to track; must model std::totally_ordered and std::assignable_from const & score_t . |
coordinate_t | The type of the coordinate to track; must model std::assignable_from const & coordinate_t . |
[in,out] | optimal_score | The optimal score to update. |
[in,out] | optimal_coordinate | The optimal coordinate to update. |
[in] | current_score | The score of the current cell. |
[in] | current_coordinate | The coordinate of the current cell. |
Compares the current_score with the optimal score and updates the optimal score and coordinate if the current one is the new optimum. Otherwise, keeps the old optimum.