SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
Algorithm

Provides core functionality used to configure algorithms. More...

+ Collaboration diagram for Algorithm:

Classes

class  seqan3::detail::algorithm_executor_blocking< resource_t, algorithm_t, algorithm_result_t, execution_handler_t >
 A blocking algorithm executor for algorithms. More...
 
class  seqan3::algorithm_result_generator_range< algorithm_executor_type >
 An input range over the algorithm results generated by the underlying algorithm executor. More...
 
interface  config_element
 Concept for an algorithm configuration element. More...
 
interface  config_element_pipeable_with
 Concept to check if one configuration element can be combined with another configuration element. More...
 
class  seqan3::configuration< configs_t >
 Collection of elements to configure an algorithm. More...
 
class  seqan3::detail::debug_mode< wrapped_config_id_t >
 A global configuration type used to enabled debugging of algorithms. More...
 
class  seqan3::detail::execution_handler_parallel
 Handles the parallel execution of algorithms. More...
 
struct  seqan3::detail::execution_handler_sequential
 Handles the sequential execution of algorithms. More...
 
struct  seqan3::detail::is_configuration_valid< query_t, compare_types >
 Checks if a given type is compatible with a list of other types. More...
 
struct  seqan3::detail::is_same_configuration_f< query_t >
 Helper meta function to check if a template type is contained in a seqan3::configuration. More...
 
class  seqan3::detail::parallel_mode< wrapped_config_id_t >
 A global configuration type used to enable parallel execution of algorithms. More...
 
class  seqan3::pipeable_config_element< derived_t >
 Adds pipe interface to configuration elements. More...
 
struct  std::tuple_element< pos, seqan3::configuration< configs_t... > >
 Returns the type of the element at the specified position within seqan3::configuration. More...
 
struct  std::tuple_size< seqan3::configuration< configs_t... > >
 Returns the number of elements stored in seqan3::configuration. More...
 

Variables

template<typename algorithm_id_type >
constexpr std::array< std::array< void *, 0 >, 0 > seqan3::detail::compatibility_table {}
 Declaration of algorithm specific compatibility table. More...
 
template<>
constexpr std::array< std::array< bool, static_cast< uint8_t >align_config_id::SIZE)>, static_cast< uint8_t >align_config_id::SIZE)> seqan3::detail::compatibility_table< align_config_id >
 Declaration of algorithm specific compatibility table. More...
 
template<typename config1_t , typename config2_t >
constexpr bool seqan3::is_config_element_combineable_v = detail::config_element_pipeable_with<config1_t, config2_t>
 Helper variable template to test if a configuration element is combineable with another configuration element or configuration. More...
 
template<typename query_t , typename ... compare_types>
constexpr bool is_configuration_valid_v = is_configuration_valid<query_t, compare_types...>::value
 Helper variable template to check for valid configuration composites (unary_type_trait shortcut).
 

Tuple interface

template<template< typename ... > class query_t, typename ... configs_t>
constexpr auto & get (configuration< configs_t... > &config) noexcept
 Returns the stored element. More...
 

Detailed Description

Provides core functionality used to configure algorithms.

Function Documentation

◆ get()

template<template< typename ... > class query_t, typename ... configs_t>
constexpr auto & get ( configuration< configs_t... > &  config)
related

Returns the stored element.

Template Parameters
query_tA template template.
Parameters
[in]configThe configuration to get the element for.

Extends the position-based and type based get interface for the configuration type, with a version that also accepts template-template types (types that are itself templates), such that the exact template definition must not be known.

Example

The following snippet demonstrates the various versions of get that can be used.

int main()
{
using seqan3::get;
// my_cfg is now of type configuration<gap_cost_affine, band_fixed_size>
seqan3::debug_stream << get<1>(my_cfg).lower_diagonal << '\n'; // prints -4
seqan3::debug_stream << get<seqan3::align_cfg::band_fixed_size>(my_cfg).upper_diagonal << '\n'; // prints 4
seqan3::debug_stream << get<seqan3::align_cfg::gap_cost_affine>(my_cfg).extension_score << '\n'; // prints -1
}
Provides seqan3::detail::align_config_band.
Provides seqan3::align_config::gap_cost_affine.
Configuration element for setting a fixed size band.
Definition: align_config_band.hpp:72
A configuration element for the affine gap cost scheme.
Definition: align_config_gap_cost_affine.hpp:74
Collection of elements to configure an algorithm.
Definition: configuration.hpp:46
Provides seqan3::configuration and utility functions.
Provides seqan3::debug_stream and related types.
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: configuration.hpp:434
Provides seqan3::pipeable_config_element.
A strong type of underlying type int32_t that represents the score (usually negative) of any characte...
Definition: align_config_gap_cost_affine.hpp:52
A strong type representing the lower diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:29
A strong type of underlying type int32_t that represents a score (usually negative) that is incurred ...
Definition: align_config_gap_cost_affine.hpp:34
A strong type representing the upper diagonal of the seqan3::align_cfg::band_fixed_size.
Definition: align_config_band.hpp:40

Exception

no-throw guarantee.

Complexity

Constant time.

Variable Documentation

◆ compatibility_table

template<typename algorithm_id_type >
constexpr std::array<std::array<void *, 0>, 0> seqan3::detail::compatibility_table {}
inlineconstexpr

Declaration of algorithm specific compatibility table.

Template Parameters
algorithm_id_typeThe type of the algorithm specific id. Algorithm configurations must maintain this table to allow validation checks.

◆ compatibility_table< align_config_id >

template<>
constexpr std::array<std::array<bool, static_cast<uint8_t>align_config_id::SIZE)>, static_cast<uint8_t>align_config_id::SIZE)> seqan3::detail::compatibility_table< align_config_id >
inlineconstexpr

Declaration of algorithm specific compatibility table.

Template Parameters
algorithm_id_typeThe type of the algorithm specific id. Algorithm configurations must maintain this table to allow validation checks.

◆ is_config_element_combineable_v

template<typename config1_t , typename config2_t >
constexpr bool seqan3::is_config_element_combineable_v = detail::config_element_pipeable_with<config1_t, config2_t>
inlineconstexpr

Helper variable template to test if a configuration element is combineable with another configuration element or configuration.

Template Parameters
config1_tEither the type of a configuration element or a configuration.
config2_tEither the type of a configuration element or a configuration.

This helper variable template checks if config1_t fulfills the concept requirements seqan3::detail::config_element_pipeable_with config2_t. If config2_t is a seqan3::configuration, the check will be expanded to every configuration element contained in the configuration type. Only if config1_t is combineable with every element stored inside of the given configuration, this helper variable template evaluates to true, otherwise false. If config1_t is a seqan3::configuration the same applies in combination with the configuration element config2_t. If both config1_t and config2_t are seqan3::configuration types, then the cartesian product between the configuration elements of the first configuration and the second configuration are tested.

This entity is not part of the SeqAn API. Do not rely on it in your applications. This entity is exposition only!