Implements the tracker to store the global optimum for a particular alignment computation.
More...
|
optimum_updater_t | compare_and_set_optimum {} |
| The function object to compare and exchange the optimum.
|
|
matrix_coordinate_type | optimal_coordinate {} |
| The matrix coordinate of the tracked optimum.
|
|
score_type | optimal_score {} |
| The tracked score of the global optimum.
|
|
bool | test_every_cell {false} |
| Whether every cell of the alignment matrix shall be tracked.
|
|
bool | test_last_column_cell {false} |
| Whether cells of the last column shall be tracked.
|
|
bool | test_last_row_cell {false} |
| Whether cells of the last row shall be tracked.
|
|
Implements the tracker to store the global optimum for a particular alignment computation.
- Template Parameters
-
alignment_configuration_t | The type of the alignment configuration; must be a type specialisation of seqan3::configuration. |
optimum_updater_t | The type of the optimum update operation, which compares and updates the alignment optimum with the current cell; must model std::semiregular. |
Implements the interface to track the alignment optimum. It updates the currently stored optimum using the optimum update operation. The optimum update operation is stored inside of the class and can have a state. The optimum updater must be invokable with a reference to the optimal score and coordinate and the score and coordinate of the current cell. Special methods are offered to track any cell (for example when computing the local alignment), the last cell of a column or a row (for example when using free-end gaps), or the final cell of the entire matrix (for example in the standard global alignment). The optimum needs to be reset in between alignment computations in order to ensure that the correct result is tracked.
template<typename alignment_configuration_t , std::semiregular optimum_updater_t>
template<typename cell_t >
Handles the invocation of the optimum comparator and updater.
- Template Parameters
-
cell_t | The cell type of the alignment matrix; must have a member function best_score() . |
- Parameters
-
[in] | cell | The current cell to be tracked. |
[in] | coordinate | The matrix coordinate of the current cell. |
Forwards the score and coordinate pair as a tuple and invokes the compare and set operation with the so far best score/coordinate pair and the current score/coordinate pair.
template<typename alignment_configuration_t , std::semiregular optimum_updater_t>
template<typename cell_t >
Tracks any cell within the alignment matrix.
- Template Parameters
-
cell_t | The cell type of the alignment matrix; must have a member function best_score() . |
- Parameters
-
[in] | cell | The current cell to be tracked. |
[in] | coordinate | The matrix coordinate of the current cell. |
- Returns
- The forwarded cell.
A call to this function only tracks the optimal score of the given cell if the configuration of the alignment algorithm requires it, for example when a local alignment shall be computed.
template<typename alignment_configuration_t , std::semiregular optimum_updater_t>
template<typename cell_t >
Tracks the final cell of the alignment matrix.
- Template Parameters
-
cell_t | The cell type of the alignment matrix; must have a member function best_score() . |
- Parameters
-
[in] | cell | The current cell to be tracked. |
[in] | coordinate | The matrix coordinate of the current cell. |
- Returns
- The forwarded cell.
A call to this function only tracks the optimal score of the given cell if the configuration of the alignment algorithm requires it, for example when a global alignment shall be computed.
template<typename alignment_configuration_t , std::semiregular optimum_updater_t>
template<typename cell_t >
Tracks the last cell of a column within the alignment matrix.
- Template Parameters
-
cell_t | The cell type of the alignment matrix; must have a member function best_score() . |
- Parameters
-
[in] | cell | The current cell to be tracked. |
[in] | coordinate | The matrix coordinate of the current cell. |
- Returns
- The forwarded cell.
A call to this function only tracks the optimal score of the given cell if the configuration of the alignment algorithm requires it, for example when a semi-global alignment shall be computed.
template<typename alignment_configuration_t , std::semiregular optimum_updater_t>
template<typename cell_t >
Tracks the last cell of a row within the alignment matrix.
- Template Parameters
-
cell_t | The cell type of the alignment matrix; must have a member function best_score() . |
- Parameters
-
[in] | cell | The current cell to be tracked. |
[in] | coordinate | The matrix coordinate of the current cell. |
- Returns
- The forwarded cell.
A call to this function only tracks the optimal score of the given cell if the configuration of the alignment algorithm requires it, for example when a semi-global alignment shall be computed.