SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::max_score_updater Struct Reference

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.
 

Detailed Description

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.

See also
seqan3::detail::max_score_banded_updater

Member Function Documentation

◆ operator()()

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 seqan3::detail::max_score_updater::operator() ( score_t &  optimal_score,
coordinate_t &  optimal_coordinate,
score_t  current_score,
coordinate_t  current_coordinate 
) const
inlinenoexcept

Compares and updates the optimal score-coordinate pair.

Template Parameters
score_tThe type of the score to track; must model std::totally_ordered and std::assignable_from const & score_t.
coordinate_tThe type of the coordinate to track; must model std::assignable_from const & coordinate_t.
Parameters
[in,out]optimal_scoreThe optimal score to update.
[in,out]optimal_coordinateThe optimal coordinate to update.
[in]current_scoreThe score of the current cell.
[in]current_coordinateThe 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.


The documentation for this struct was generated from the following file:
Hide me