This algorithm unifies different edit distance implementations and uses the appropriate one depending on the given configuration.
More...
template<typename config_t, typename traits_t>
class seqan3::detail::edit_distance_algorithm< config_t, traits_t >
This algorithm unifies different edit distance implementations and uses the appropriate one depending on the given configuration.
- Template Parameters
-
config_t | The configuration type. |
traits_t | The traits type. |
This wrapper class is used to decouple the sequence types from the algorithm class type. Within the alignment configuration a std::function object storing this wrapper is returned if an edit distance should be computed. On invocation it delegates the call to the actual implementation of the edit distance algorithm, while the interface is unified with the execution model of the pairwise alignment algorithms.
template<typename config_t , typename traits_t >
template<std::ranges::forward_range first_range_t, std::ranges::forward_range second_range_t, typename callback_t >
constexpr void seqan3::detail::edit_distance_algorithm< config_t, traits_t >::compute_single_pair |
( |
size_t const |
idx, |
|
|
first_range_t && |
first_range, |
|
|
second_range_t && |
second_range, |
|
|
callback_t && |
callback |
|
) |
| |
|
inlineconstexprprivate |
Invokes the actual alignment computation for a single pair of sequences.
- Template Parameters
-
first_range_t | The type of the first sequence (or packed sequences); must model std::ranges::forward_range. |
second_range_t | The type of the second sequence (or packed sequences); must model std::ranges::forward_range. |
callback_t | The callback to call on the computed alignment result. |
- Parameters
-
[in] | idx | The index of the current sequence pair. |
[in] | first_range | The first sequence (or packed sequences). |
[in] | second_range | The second sequence (or packed sequences). |
[in] | callback | The callback to invoke on an alignment result. |
template<typename config_t , typename traits_t >
template<indexed_sequence_pair_range indexed_sequence_pairs_t, typename callback_t >
}
Invokes the alignment computation for every indexed sequence pair contained in the given range.
- Template Parameters
-
indexed_sequence_pairs_t | The type of the range of the indexed sequence pairs; must model seqan3::detail::indexed_sequence_pairs. |
callback_t | The type of the callback function that is called with the alignment result; must model std::invocable accepting one argument of type seqan3::alignment_result. |
- Parameters
-
[in] | indexed_sequence_pairs | The indexed sequence pairs to align. |
[in] | callback | The callback function to be invoked with the alignment result; must model std::invocable with the respective seqan3::alignment_result type. |
- Returns
- A std::vector over seqan3::alignment_result.
Computes for each contained sequence pair the respective alignment and invokes the given callback for each alignment result.