31template <
typename configuration_t,
typename index_t,
typename... policies_t>
41 static_assert(!std::same_as<search_result_type, empty_type>,
"The search result type was not configured.");
92 template <tuple_like indexed_query_t,
typename callback_t>
93 requires (std::tuple_size_v<indexed_query_t> == 2)
94 && std::ranges::forward_range<std::tuple_element_t<1, indexed_query_t>>
95 && std::invocable<callback_t, search_result_type>
116 index_t
const * index_ptr{
nullptr};
122 template <
bool abort_on_hit,
typename query_t,
typename delegate_t>
132 template <
typename query_t,
typename delegate_t>
138 if constexpr (!traits_t::search_all_hits)
150 constexpr bool abort_on_hit = !traits_t::search_all_best_hits;
154 if constexpr (traits_t::search_strata_hits)
214template <
typename search_scheme_t>
217 using blocks_length_type =
typename search_scheme_t::value_type::blocks_length_type;
219 constexpr bool is_dyn_scheme = std::same_as<search_scheme_t, search_scheme_dyn_type>;
234 uint8_t
const rest{
static_cast<uint8_t
>(query_length % blocks)};
258 for (uint8_t
i = 1;
i < blocks; ++
i)
279 typename cursor_t::size_type
const lb,
280 typename cursor_t::size_type
const rb,
329 typename cursor_t::size_type
const lb,
330 typename cursor_t::size_type
const rb,
339 using size_type =
typename cursor_t::size_type;
409 typename cursor_t::size_type
const lb,
410 typename cursor_t::size_type
const rb,
494 typename cursor_t::size_type
const lb,
495 typename cursor_t::size_type
const rb,
505 using size_type =
typename cursor_t::size_type;
599 if (
error_left.deletion > 0 && !(
go_right && (rb == 1 || rb == std::ranges::size(query) + 1))
600 && !(!
go_right && (lb == 0 || lb == std::ranges::size(query))))
636 typename cursor_t::size_type
const lb,
637 typename cursor_t::size_type
const rb,
682 using size_type =
typename cursor_t::size_type;
776template <
bool abort_on_hit,
typename index_t,
typename query_t,
typename search_scheme_t,
typename delegate_t>
828template <
typename configuration_t,
typename index_t,
typename... policies_t>
Provides the bidirectional seqan3::bi_fm_index.
The algorithm that performs a bidirectional search on a bidirectional FM index using (optimal) search...
Definition search_scheme_algorithm.hpp:34
void perform_search_by_hit_strategy(std::vector< typename index_t::cursor_type > &internal_hits, query_t &query, search_param error_state, delegate_t const &on_hit_delegate)
Calls search_algo_bi depending on the search strategy (hit configuration) given in the configuration.
Definition search_scheme_algorithm.hpp:133
~search_scheme_algorithm()=default
Defaulted.
search_scheme_algorithm(search_scheme_algorithm const &)=default
Defaulted.
typename traits_t::search_result_type search_result_type
The search result type.
Definition search_scheme_algorithm.hpp:39
search_scheme_algorithm & operator=(search_scheme_algorithm &&)=default
Defaulted.
search_scheme_algorithm(search_scheme_algorithm &&)=default
Defaulted.
search_scheme_algorithm(configuration_t const &cfg, index_t const &index)
Constructs from a configuration object and an index.
Definition search_scheme_algorithm.hpp:65
search_scheme_algorithm & operator=(search_scheme_algorithm const &)=default
Defaulted.
search_scheme_algorithm()=default
Defaulted.
Configuration element to receive all hits with the best number of errors plus the given stratum....
Definition hit.hpp:107
@ result_type
ID for the result_type option.
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition alphabet/concept.hpp:152
@ hit
Identifier for the hit configuration (all, all_best, single_best, strata).
auto search_scheme_block_info(search_scheme_t const &search_scheme, size_t const query_length)
Returns for each search the cumulative length of blocks in the order of blocks in each search and the...
Definition search_scheme_algorithm.hpp:215
bool search_ss(cursor_t cur, query_t &query, typename cursor_t::size_type const lb, typename cursor_t::size_type const rb, uint8_t const errors_spent, uint8_t const block_id, bool const go_right, search_t const &search, blocks_length_t const &blocks_length, search_param const error_left, delegate_t &&delegate)
Searches a query sequence in a bidirectional index using a single search of a search schemes.
Definition search_scheme_algorithm.hpp:634
bool search_ss_children(cursor_t cur, query_t &query, typename cursor_t::size_type const lb, typename cursor_t::size_type const rb, uint8_t const errors_spent, uint8_t const block_id, bool const go_right, uint8_t const min_error_left_in_block, search_t const &search, blocks_length_t const &blocks_length, search_param const error_left, delegate_t &&delegate)
Searches a query sequence in a bidirectional index using a single search of a search schemes....
Definition search_scheme_algorithm.hpp:492
bool search_ss_exact(cursor_t cur, query_t &query, typename cursor_t::size_type const lb, typename cursor_t::size_type const rb, uint8_t const errors_spent, uint8_t const block_id, bool const go_right, search_t const &search, blocks_length_t const &blocks_length, search_param const error_left, delegate_t &&delegate)
Searches a query sequence in a bidirectional index using a single search of a search scheme....
Definition search_scheme_algorithm.hpp:327
bool search_ss_deletion(cursor_t cur, query_t &query, typename cursor_t::size_type const lb, typename cursor_t::size_type const rb, uint8_t const errors_spent, uint8_t const block_id, bool const go_right, search_t const &search, blocks_length_t const &blocks_length, search_param const error_left, delegate_t &&delegate)
Searches a query sequence in a bidirectional index using a single search of a search schemes....
Definition search_scheme_algorithm.hpp:407
std::vector< search_dyn > compute_ss(uint8_t const min_error, uint8_t const max_error)
Computes a (non-optimal) search scheme. Currently the generated search scheme represents trivial back...
Definition search_scheme_algorithm.hpp:186
typename transformation_trait_or< type_t, default_t >::type transformation_trait_or_t
Helper type of seqan3::detail::transformation_trait_or (transformation_trait shortcut).
Definition transformation_trait_or.hpp:48
constexpr auto slice
A view adaptor that returns a half-open interval on the underlying range.
Definition slice.hpp:137
Provides concept seqan3::template_specialisation_of<mytype, [...]> for checking the type specialisati...
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
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:412
Provides the concept for seqan3::detail::sdsl_index.
Provides data structures used by different search algorithms.
Provides the data structures and precomputed instances for (optimum) search schemes.
Provides seqan3::detail::search_traits.
Provides seqan3::views::slice.
Object grouping numbers of errors for different kind of error types.
Definition search_common.hpp:22
uint8_t total
Total number of errors (upper bound over all error types).
Definition search_common.hpp:24
A collection of traits extracted from the search configuration.
Definition search_traits.hpp:31
typename std::remove_cvref_t< decltype(std::declval< search_configuration_t >().get_or(search_cfg::detail::result_type< empty_search_result_type >{}))>::type search_result_type
The configured search result type.
Definition search_traits.hpp:36
Object storing information for a search (of a search scheme).
Definition search_scheme_precomputed.hpp:25
constexpr uint8_t blocks() const noexcept
Returns the number of blocks.
Definition search_scheme_precomputed.hpp:37
std::array< uint8_t, nbr_blocks > u
Upper error bound for each block (accumulated values)
Definition search_scheme_precomputed.hpp:34
std::array< uint8_t, nbr_blocks > l
Lower error bound for each block (accumulated values)
Definition search_scheme_precomputed.hpp:32
std::array< uint8_t, nbr_blocks > pi
Order of blocks.
Definition search_scheme_precomputed.hpp:30