SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
|
A policy that provides a common interface to acquire the correct alignment matrices. More...
#include <seqan3/alignment/pairwise/detail/policy_alignment_matrix.hpp>
Protected Member Functions | |
auto | acquire_matrices (size_t const sequence1_size, size_t const sequence2_size, score_type initial_score=score_type{}) const |
Acquires a new thread local alignment and index matrix for the given sequence sizes. | |
void | check_valid_band_configuration (size_t const sequence1_size, size_t const sequence2_size) const |
Checks whether the band is valid for the given sequence sizes. | |
Constructors, destructor and assignment | |
policy_alignment_matrix ()=default | |
Defaulted. | |
policy_alignment_matrix (policy_alignment_matrix const &)=default | |
Defaulted. | |
policy_alignment_matrix (policy_alignment_matrix &&)=default | |
Defaulted. | |
policy_alignment_matrix & | operator= (policy_alignment_matrix const &)=default |
Defaulted. | |
policy_alignment_matrix & | operator= (policy_alignment_matrix &&)=default |
Defaulted. | |
~policy_alignment_matrix ()=default | |
Defaulted. | |
template<typename alignment_configuration_t > requires (is_type_specialisation_of_v<alignment_configuration_t, configuration>) | |
policy_alignment_matrix (alignment_configuration_t const &config) | |
Constructs and initialises the algorithm using the alignment configuration. | |
A policy that provides a common interface to acquire the correct alignment matrices.
traits_t | The alignment configuration traits type; must be an instance of seqan3::detail::alignment_configuration_traits. |
alignment_matrix_t | The type of the alignment matrix for this alignment configuration [see requirements below]. |
The alignment matrix must be a matrix type that is compatible with the configured alignment algorithm. It must offer a resize member function that takes a seqan3::detail::column_index_type and seqan3::detail::row_index_type and an additional parameter to initialise the allocated matrix memory.
|
no-apiinlineprotected |
Constructs and initialises the algorithm using the alignment configuration.
alignment_configuration_t | The type of the alignment configuration; must be an instance of seqan3::configuration. |
[in] | config | The configuration passed into the algorithm. |
Initialises the members for the lower and upper diagonal. These members are only used if the banded alignment is computed.
seqan3::invalid_alignment_configuration | if the given band settings are invalid. |
|
no-apiinlineprotected |
Acquires a new thread local alignment and index matrix for the given sequence sizes.
[in] | sequence1_size | The size of the first sequence. |
[in] | sequence2_size | The size of the second sequence. |
[in] | initial_score | The initial score used for the acquired alignment matrix. |
Acquires a thread local alignment and index matrix. Initialises the matrices with the given sequence sizes and the initial score value. In the banded alignment, the alignment matrix is reduced to the column count times the band size.
Might throw std::bad_alloc if the requested matrix size exceeds the available memory or seqan3::invalid_alignment_configuration if the band does not allow a valid computation of the configured alignment.
std::bad_alloc | or seqan3::invalid_alignment_configuration |
|
no-apiinlineprotected |
Checks whether the band is valid for the given sequence sizes.
[in] | sequence1_size | The size of the first sequence. |
[in] | sequence2_size | The size of the second sequence. |
seqan3::invalid_alignment_configuration | if the band is invalid for the given sequence sizes and the alignment configuration. |