SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::alignment_optimum< score_t > Struct Template Reference

Stores the current optimum of the alignment algorithm. More...

#include <seqan3/alignment/matrix/detail/alignment_optimum.hpp>

+ Inheritance diagram for seqan3::detail::alignment_optimum< score_t >:

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.
 

Detailed Description

template<typename score_t>
struct seqan3::detail::alignment_optimum< score_t >

Stores the current optimum of the alignment algorithm.

Template Parameters
score_tThe 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.

Member Function Documentation

◆ update_if_new_optimal_score()

template<typename score_t >
template<typename column_index_t , typename row_index_t >
void seqan3::detail::alignment_optimum< score_t >::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.

Template Parameters
column_index_tThe index type for the column index; must model std::unsigned_integral.
row_index_tThe index type for the row index; must model std::unsigned_integral.
Parameters
[in]compare_scoreThe new score to compare with.
[in]column_indexThe respective column index of the alignment matrix.
[in]row_indexThe 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.


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