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 >
Constructs the wrapper with the passed configuration.
- Parameters
-
cfg | The configuration to be passed to the algorithm. |
The configuration is copied once to the heap during construction and maintained by a std::shared_ptr. The configuration is not passed to the function-call-operator of this function object in order to avoid incompatible configurations between the passed configuration and the one used during configuration of this class. Further, the function object will be stored in a std::function which requires copyable objects and in parallel executions the function object must be copied as well.
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 |
|
) |
| |
|
no-apiinlineconstexprprivate |
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. |