SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::alignment_configuration_traits< configuration_t > Struct Template Reference

A traits type for the alignment algorithm that exposes static information stored within the alignment configuration object. More...

#include <seqan3/alignment/pairwise/detail/type_traits.hpp>

Public Types

using alignment_result_type = decltype(determine_alignment_result_type())
 The alignment result type if present. Otherwise seqan3::detail::empty_type.
 
using matrix_coordinate_type = lazy_conditional_t< is_vectorised, lazy< simd_matrix_coordinate, matrix_index_type >, matrix_coordinate >
 The type of the matrix coordinate.
 
using matrix_index_type = std::conditional_t< is_vectorised, simd_type_t< select_scalar_index_t< original_score_type > >, size_t >
 The type of the matrix index.
 
using original_score_type = typename std::remove_reference_t< decltype(std::declval< configuration_t >().get_or(align_cfg::score_type< int32_t >{}))>::type
 The original score type selected by the user.
 
using score_type = std::conditional_t< is_vectorised, simd_type_t< original_score_type >, original_score_type >
 The score type for the alignment algorithm.
 
using scoring_scheme_alphabet_type = typename scoring_scheme_type::alphabet_type
 The alphabet of the selected scoring scheme.
 
using scoring_scheme_type = decltype(get< align_cfg::scoring_scheme >(std::declval< configuration_t >()).scheme)
 The selected scoring scheme.
 
using trace_type = std::conditional_t< is_vectorised, simd_type_t< original_score_type >, trace_directions >
 The trace directions type for the alignment algorithm.
 

Static Public Attributes

static constexpr size_t alignments_per_vector
 The number of alignments that can be computed in one simd vector.
 
static constexpr bool compute_begin_positions
 Flag indicating whether the begin positions shall be computed.
 
static constexpr bool compute_end_positions = configuration_t::template exists<align_cfg::output_end_position>()
 Flag indicating whether the end positions shall be computed.
 
static constexpr bool compute_score = configuration_t::template exists<align_cfg::output_score>()
 Flag indicating whether the score shall be computed.
 
static constexpr bool compute_sequence_alignment = configuration_t::template exists<align_cfg::output_alignment>()
 Flag indicating whether the sequence alignment shall be computed.
 
static constexpr bool has_output_configuration
 Flag indicating if any output option was set.
 
static constexpr bool is_banded = configuration_t::template exists<align_cfg::band_fixed_size>()
 Flag indicating whether banded alignment mode is enabled.
 
static constexpr bool is_debug = configuration_t::template exists<detail::debug_mode>()
 Flag indicating whether debug mode is enabled.
 
static constexpr bool is_global = configuration_t::template exists<seqan3::align_cfg::method_global>()
 Flag indicating whether global alignment method is enabled.
 
static constexpr bool is_local = configuration_t::template exists<seqan3::align_cfg::method_local>()
 Flag indicating whether local alignment mode is enabled.
 
static constexpr bool is_one_way_execution = configuration_t::template exists<align_cfg::on_result>()
 Flag indicating whether a user provided callback was given.
 
static constexpr bool is_parallel = configuration_t::template exists<align_cfg::parallel>()
 Flag indicating whether parallel alignment mode is enabled.
 
static constexpr bool is_vectorised = configuration_t::template exists<align_cfg::vectorised>()
 Flag to indicate vectorised mode.
 
static constexpr bool output_sequence1_id = configuration_t::template exists<align_cfg::output_sequence1_id>()
 Flag indicating whether the id of the first sequence shall be returned.
 
static constexpr bool output_sequence2_id = configuration_t::template exists<align_cfg::output_sequence2_id>()
 Flag indicating whether the id of the second sequence shall be returned.
 
static constexpr bool requires_trace_information = compute_begin_positions || compute_sequence_alignment
 Flag indicating whether the trace matrix needs to be computed.
 

Private Types

template<arithmetic score_t>
using select_scalar_index_t = min_viable_uint_t< 1ull<<(bits_of< score_t > - 1)>
 An index type (i.e. unsigned integral) for a score_type which has the same bit size.
 

Static Private Member Functions

static constexpr auto determine_alignment_result_type () noexcept
 Helper function to determine the alignment result type.
 

Detailed Description

template<typename configuration_t>
requires is_type_specialisation_of_v<std::remove_cv_t<configuration_t>, configuration>
struct seqan3::detail::alignment_configuration_traits< configuration_t >

A traits type for the alignment algorithm that exposes static information stored within the alignment configuration object.

Template Parameters
configuration_tThe type of the alignment configuration object; must be a specialisation of seqan3::configuration.

Member Typedef Documentation

◆ select_scalar_index_t

template<typename configuration_t >
template<arithmetic score_t>
using seqan3::detail::alignment_configuration_traits< configuration_t >::select_scalar_index_t = min_viable_uint_t<1ull << (bits_of<score_t> - 1)>
private

An index type (i.e. unsigned integral) for a score_type which has the same bit size.

Template Parameters
score_tThe score type for which the corresponding index type shall be returned; must model seqan3::arithmetic.

If the score type models std::integral it will simply be converted to its unsigned counterpart. For floating point types the bit size is determined and the corresponding minimal viable unsigned integral type (seqan3::detail::min_viable_uint_t) is returned.

Member Data Documentation

◆ alignments_per_vector

template<typename configuration_t >
constexpr size_t seqan3::detail::alignment_configuration_traits< configuration_t >::alignments_per_vector
staticconstexpr
Initial value:
= []() constexpr
{
if constexpr (is_vectorised)
return simd_traits<score_type>::length;
else
return 1;
}()
static constexpr bool is_vectorised
Flag to indicate vectorised mode.
Definition alignment/pairwise/detail/type_traits.hpp:112

The number of alignments that can be computed in one simd vector.

◆ compute_begin_positions

template<typename configuration_t >
constexpr bool seqan3::detail::alignment_configuration_traits< configuration_t >::compute_begin_positions
staticconstexpr
Initial value:
=
configuration_t::template exists<align_cfg::output_begin_position>()

Flag indicating whether the begin positions shall be computed.

◆ has_output_configuration

template<typename configuration_t >
constexpr bool seqan3::detail::alignment_configuration_traits< configuration_t >::has_output_configuration
staticconstexpr
Initial value:
static constexpr bool output_sequence2_id
Flag indicating whether the id of the second sequence shall be returned.
Definition alignment/pairwise/detail/type_traits.hpp:165
static constexpr bool compute_sequence_alignment
Flag indicating whether the sequence alignment shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:161
static constexpr bool compute_begin_positions
Flag indicating whether the begin positions shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:158
static constexpr bool output_sequence1_id
Flag indicating whether the id of the first sequence shall be returned.
Definition alignment/pairwise/detail/type_traits.hpp:163
static constexpr bool compute_end_positions
Flag indicating whether the end positions shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:156
static constexpr bool compute_score
Flag indicating whether the score shall be computed.
Definition alignment/pairwise/detail/type_traits.hpp:154

Flag indicating if any output option was set.


The documentation for this struct was generated from the following file:
Hide me