28template <
typename word_t,
typename score_t,
bool is_semi_global,
bool use_max_errors>
33 template <std::ranges::viewable_range database_t,
34 std::ranges::viewable_range query_t,
35 typename align_config_t,
51 template <
typename derived_t,
typename edit_traits>
66 static constexpr auto word_size = bits_of<word_type>;
104 template <
typename score_type>
106 unsigned const last_block,
112 return active_row + (score <= max_errors);
131 size_t col = coordinate.col;
132 size_t row = coordinate.row;
135 assert(col <
cols());
138 if constexpr (use_max_errors)
144 size_t current_row = 1u;
145 size_t word_idx = 0u;
150 if (
row >= current_row)
198 requires (!use_max_errors)
201 column.vp = std::move(vp);
202 column.vn = std::move(vn);
213 requires use_max_errors
216 column.vp = std::move(vp);
217 column.vn = std::move(vn);
Provides utility functions for bit twiddling.
The underlying data structure of seqan3::detail::edit_distance_unbanded that represents the score mat...
Definition edit_distance_score_matrix_full.hpp:30
score_t score_type
The type of the score.
Definition edit_distance_score_matrix_full.hpp:69
size_t size_type
The size type of the matrix.
Definition edit_distance_score_matrix_full.hpp:78
edit_distance_score_matrix_full & operator=(edit_distance_score_matrix_full &&)=default
Defaulted.
static size_t max_rows(word_type const score_mask, unsigned const last_block, score_type const score, score_type const max_errors) noexcept
Computes the number of max rows in the current column.
Definition edit_distance_score_matrix_full.hpp:105
size_t rows_size
The number of rows in the matrix.
Definition edit_distance_score_matrix_full.hpp:225
reference at(matrix_coordinate const &coordinate) const noexcept
A reference to the entry of the matrix at the given coordinate.
Definition edit_distance_score_matrix_full.hpp:129
edit_distance_score_matrix_full(size_t const rows_size)
Construct the score_matrix by giving the number of rows within the matrix.
Definition edit_distance_score_matrix_full.hpp:57
std::vector< column_type > columns
The columns of the score matrix.
Definition edit_distance_score_matrix_full.hpp:227
static constexpr std::optional< score_type > inf
A special score which represents infinity.
Definition edit_distance_score_matrix_full.hpp:81
edit_distance_score_matrix_full(edit_distance_score_matrix_full &&)=default
Defaulted.
size_t rows() const noexcept
The number of rows in the matrix.
Definition edit_distance_score_matrix_full.hpp:160
static constexpr auto word_size
The size of one machine word.
Definition edit_distance_score_matrix_full.hpp:66
void add_column(std::vector< word_type > vp, std::vector< word_type > vn, size_t const max_rows)
Adds a column to the score matrix.
Definition edit_distance_score_matrix_full.hpp:212
size_t cols() const noexcept
The number of columns in the matrix.
Definition edit_distance_score_matrix_full.hpp:166
std::conditional_t< use_max_errors, std::optional< score_type >, score_type > value_type
The type of an entry in the matrix.
Definition edit_distance_score_matrix_full.hpp:72
word_t word_type
The type of one machine word.
Definition edit_distance_score_matrix_full.hpp:63
edit_distance_score_matrix_full(edit_distance_score_matrix_full const &)=default
Defaulted.
void reserve(size_t const new_capacity)
Increase the capacity of the columns to a value that is greater or equal to new_capacity.
Definition edit_distance_score_matrix_full.hpp:91
edit_distance_score_matrix_full & operator=(edit_distance_score_matrix_full const &)=default
Defaulted.
void add_column(std::vector< word_type > vp, std::vector< word_type > vn)
Adds a column to the score matrix.
Definition edit_distance_score_matrix_full.hpp:197
static score_type score_delta_of_word(word_type const &vp, word_type const &vn) noexcept
Computes delta score between vp and vn.
Definition edit_distance_score_matrix_full.hpp:120
edit_distance_score_matrix_full()=default
Defaulted.
~edit_distance_score_matrix_full()=default
Defaulted.
Only available when default_edit_distance_trait_type::compute_score_matrix is true.
Definition edit_distance_unbanded.hpp:418
This calculates an alignment using the edit distance and without a band.
Definition edit_distance_unbanded.hpp:711
Implementation of a masked alphabet to be used for tuple composites.
Definition mask.hpp:35
Forwards for seqan3::edit_distance_unbanded related types.
@ column
The corresponding alignment coordinate will be incrementable/decrementable in the column index.
@ row
The corresponding alignment coordinate will be incrementable/decrementable in the row index.
@ offset
Sequence (seqan3::field::seq) relative start position (0-based), unsigned value.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
The state of one computation step.
Definition edit_distance_score_matrix_full.hpp:191
If use_max_errors is true store these additional state information in state_type.
Definition edit_distance_score_matrix_full.hpp:174
size_t max_rows
The number of max_rows within the current column. Computed by seqan3::detail::edit_distance_score_mat...
Definition edit_distance_score_matrix_full.hpp:177
This information is needed to infer the score matrix.
Definition edit_distance_score_matrix_full.hpp:182
std::vector< word_type > vn
The machine word which stores the negative vertical differences.
Definition edit_distance_score_matrix_full.hpp:186
std::vector< word_type > vp
The machine word which stores the positive vertical differences.
Definition edit_distance_score_matrix_full.hpp:184