|
SeqAn3 3.4.0-rc.4
The Modern C++ library for sequence analysis.
|
Class used to update the search configuration, e.g. add defaults. More...
#include <seqan3/search/detail/search_configurator.hpp>
Classes | |
| struct | select_search_algorithm |
| Selects the search algorithm based on the index type. More... | |
| struct | select_search_result |
| Select the search result based on the configuration and the index type. More... | |
Static Public Member Functions | |
| template<typename configuration_t > | |
| static auto | add_default_hit_configuration (configuration_t const &cfg) |
| Add seqan3::search_cfg::hit_all to the configuration if no search strategy (hit configuration) was chosen. | |
| template<typename configuration_t > | |
| static auto | add_default_output_configuration (configuration_t const &cfg) |
| Add seqan3::search_cfg::text_position to the configuration if seqan3::search_cfg::output was not set. | |
| template<typename configuration_t > | |
| static auto | add_defaults (configuration_t const &cfg) |
| Adds default configurations if they were not set by the user. | |
| template<typename query_t , typename configuration_t , typename index_t > | |
| static auto | configure_algorithm (configuration_t const &cfg, index_t const &index) |
| Chooses the appropriate search algorithm depending on the index. | |
| template<typename algorithm_t , typename configuration_t , typename index_t > | |
| static algorithm_t | configure_hit_strategy (configuration_t const &, index_t const &) |
| Configures the algorithm with the correct hit strategy. | |
| template<typename algorithm_t , typename configuration_t , typename index_t > | |
| static algorithm_t | select_and_return_algorithm (configuration_t const &config, index_t const &index) |
| Select and return the configured search algorithm. | |
Class used to update the search configuration, e.g. add defaults.
|
inlinestatic |
Add seqan3::search_cfg::hit_all to the configuration if no search strategy (hit configuration) was chosen.
| configuration_t | The type of the search configuration. |
| [in] | cfg | The configuration to be modified if necessary. |
If no hit configuration was set, it defaults to seqan3::search_cfg::hit_all.
|
inlinestatic |
Add seqan3::search_cfg::text_position to the configuration if seqan3::search_cfg::output was not set.
| configuration_t | The type of the search configuration. |
| [in] | cfg | The configuration to be modified if necessary. |
If seqan3::search_cfg::output was not set, it defaults to seqan3::search_cfg::text_position.
|
inlinestatic |
Adds default configurations if they were not set by the user.
| configuration_t | The type of the search configuration. |
| [in] | cfg | The configuration to be modified. |
Modifies the configuration object by adding default configuration elements.
|
inlinestatic |
Chooses the appropriate search algorithm depending on the index.
| query_t | An explicit template argument for the query type the search algorithm is invoked with. |
| configuration_t | The type of the search configuration. |
| index_t | The type of the index. |
| [in] | cfg | The search configuration object that is passed to the algorithm. |
| [in] | index | The index that is passed to the algorithm. |
If the cursor of index_t models seqan3::detail::template_specialisation_of a seqan3::bi_fm_index_cursor, then the seqan3::detail::search_scheme_algorithm is chosen. Otherwise, the seqan3::detail::unidirectional_search_algorithm is chosen.
|
static |
Configures the algorithm with the correct hit strategy.
| algorithm_t | The type erased algorithm used for the fixed return type. |
| configuration_t | The type of the search configuration. |
| index_t | The type of the index. |
If the algorithm was configured with the dynamic hit configuration element seqan3::search_cfg::hit, the configuration element is removed and replaced by the selected static hit configuration element. If the hit configuration element is already a static one nothing is changed in the configuration. After selecting the correct hit strategy the corresponding search algorithm is created with the new configuration and the given index.
| std::invalid_argument | if the dynamic hit configuration was not initialised with a hit strategy. |
If no hit configuration was configured a static assert is emitted during compilation.
|
inlinestatic |
Select and return the configured search algorithm.
| algorithm_t | The type erased algorithm used for the fixed return type. |
| configuration_t | The type of the search configuration. |
| index_t | The type of the index. |
| [in] | config | The search configuration object that is passed to the algorithm. |
| [in] | index | The index that is passed to the algorithm. |
The final step of the configuration pipeline. Here the final algorithm is created and returned as the type erased std::function object. This step must be called at the end.