63 template <
typename score_t,
typename coordinate_t>
64 requires (std::assignable_from<score_t &, score_t const &> &&
65 requires (coordinate_t coordinate)
70 void operator()(score_t & optimal_score,
71 coordinate_t
const & optimal_coordinate,
72 score_t current_score,
73 coordinate_t
const & current_coordinate)
const noexcept
76 (optimal_coordinate.col == current_coordinate.col) && (optimal_coordinate.row == current_coordinate.row);
77 optimal_score = (
mask) ? std::move(current_score) : optimal_score;
85template <
typename alignment_configuration_t, std::semiregular optimum_updater_t>
86 requires is_type_specialisation_of_v<alignment_configuration_t, configuration>
194 template <std::ranges::input_range sequence1_collection_t, std::ranges::input_range sequence2_collection_t>
196 sequence2_collection_t & sequence2_collection)
201 scalar_index_t largest_sequence1_size{};
202 scalar_index_t largest_sequence2_size{};
207 size_t sequence_count{};
208 for (
auto && [sequence1, sequence2] :
views::zip(sequence1_collection, sequence2_collection))
210 sequence1_sizes[sequence_count] = std::ranges::distance(sequence1);
211 sequence2_sizes[sequence_count] = std::ranges::distance(sequence2);
212 largest_sequence1_size =
std::max(largest_sequence1_size, sequence1_sizes[sequence_count]);
213 largest_sequence2_size =
std::max(largest_sequence2_size, sequence2_sizes[sequence_count]);
220 for (
size_t index = 0; index != sequence_count; ++index)
222 assert(sequence1_sizes[index] <= largest_sequence1_size);
223 assert(sequence2_sizes[index] <= largest_sequence2_size);
226 largest_sequence2_size - sequence2_sizes[index]);
Provides algorithms to modify seqan3::simd::simd_type.
Implements the tracker to store the global optimum for a particular alignment computation.
Definition: policy_optimum_tracker_simd.hpp:94
policy_optimum_tracker_simd(alignment_configuration_t const &config)
Construction and initialisation using the alignment configuration.
Definition: policy_optimum_tracker_simd.hpp:135
void reset_optimum()
Resets the optimum such that a new alignment can be computed.
Definition: policy_optimum_tracker_simd.hpp:143
typename simd::simd_traits< score_type >::scalar_type scalar_type
The scalar type of the simd vector.
Definition: policy_optimum_tracker_simd.hpp:104
typename traits_type::original_score_type original_score_type
The original non-simd score type.
Definition: policy_optimum_tracker_simd.hpp:106
policy_optimum_tracker_simd()=default
Defaulted.
policy_optimum_tracker_simd & operator=(policy_optimum_tracker_simd &&)=default
Defaulted.
~policy_optimum_tracker_simd()=default
Defaulted.
std::array< original_score_type, simd_traits< score_type >::length > padding_offsets
The individual offsets used for padding the sequences.
Definition: policy_optimum_tracker_simd.hpp:115
policy_optimum_tracker_simd(policy_optimum_tracker_simd const &)=default
Defaulted.
score_type optimal_score
The tracked score of the global optimum.
Definition: policy_optimum_tracker.hpp:199
policy_optimum_tracker_simd & operator=(policy_optimum_tracker_simd const &)=default
Defaulted.
matrix_coordinate_type optimal_coordinate
The matrix coordinate of the tracked optimum.
Definition: policy_optimum_tracker.hpp:201
void initialise_tracker(sequence1_collection_t &sequence1_collection, sequence2_collection_t &sequence2_collection)
Initialises the tracker and possibly the binary update operation.
Definition: policy_optimum_tracker_simd.hpp:195
policy_optimum_tracker_simd(policy_optimum_tracker_simd &&)=default
Defaulted.
Implements the tracker to store the global optimum for a particular alignment computation.
Definition: policy_optimum_tracker.hpp:189
bool test_last_row_cell
Whether cells of the last row shall be tracked.
Definition: policy_optimum_tracker.hpp:208
alignment_configuration_traits< alignment_configuration_t > traits_type
The configuration traits type.
Definition: policy_optimum_tracker.hpp:192
typename traits_type::score_type score_type
The configured score type.
Definition: policy_optimum_tracker.hpp:194
score_type optimal_score
The tracked score of the global optimum.
Definition: policy_optimum_tracker.hpp:199
optimum_updater_t compare_and_set_optimum
The function object to compare and exchange the optimum.
Definition: policy_optimum_tracker.hpp:203
matrix_coordinate_type optimal_coordinate
The matrix coordinate of the tracked optimum.
Definition: policy_optimum_tracker.hpp:201
bool test_last_column_cell
Whether cells of the last column shall be tracked.
Definition: policy_optimum_tracker.hpp:210
Implementation of a masked alphabet to be used for tuple composites..
Definition: mask.hpp:38
constexpr auto zip
A view adaptor that takes several views and returns tuple-like values from every i-th element of each...
Definition: zip.hpp:573
The generic simd concept.
Provides lazy template instantiation traits.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::detail::policy_optimum_tracker.
Provides seqan3::simd::simd_type.
Provides seqan3::simd::simd_traits.
std::conditional_t< is_vectorised, simd_type_t< original_score_type >, original_score_type > score_type
The score type for the alignment algorithm.
Definition: alignment/pairwise/detail/type_traits.hpp:136
std::conditional_t< is_vectorised, simd_type_t< select_scalar_index_t< original_score_type > >, size_t > matrix_index_type
The type of the matrix index.
Definition: alignment/pairwise/detail/type_traits.hpp:143
lazy_conditional_t< is_vectorised, lazy< simd_matrix_coordinate, matrix_index_type >, matrix_coordinate > matrix_coordinate_type
The type of the matrix coordinate.
Definition: alignment/pairwise/detail/type_traits.hpp:146
typename std::remove_reference_t< decltype(std::declval< configuration_t >().get_or(align_cfg::score_type< int32_t >{}))>::type original_score_type
The original score type selected by the user.
Definition: alignment/pairwise/detail/type_traits.hpp:134
Function object that compares and updates the alignment optimum for the vectorised global alignment a...
Definition: policy_optimum_tracker_simd.hpp:45
seqan3::simd::simd_traits is the trait class that provides uniform interface to the properties of sim...
Definition: simd_traits.hpp:41
IMPLEMENTATION_DEFINED scalar_type
The underlying type of a simd vector (is not defined if simd_t does not model seqan3::simd::simd)
Definition: simd_traits.hpp:45
Provides seqan3::views::zip.