40template <
typename configuration_t,
typename index_t,
typename... policies_t>
49 static_assert(!std::same_as<search_result_type, empty_type>,
"The search result type was not configured.");
99 template <
typename indexed_query_t,
typename callback_t>
100 requires (std::tuple_size_v<indexed_query_t> == 2)
101 && std::ranges::forward_range<std::tuple_element_t<1, indexed_query_t>>
102 && std::invocable<callback_t, search_result_type>
131 template <
bool abort_on_hit,
typename query_t>
134 typename index_t::cursor_type::size_type
const query_pos,
144 template <
typename query_t>
205template <
typename configuration_t,
typename index_t,
typename... policies_t>
206template <
bool abort_on_hit,
typename query_t>
208 typename index_t::cursor_type
cur,
210 typename index_t::cursor_type::size_type
const query_pos,
218 using drop_size_t = std::ranges::range_difference_t<query_t>;
219 if (
query_pos == std::ranges::size(query)
306 while (
cur.cycle_back());
Core alphabet concept and free function/type trait wrappers.
The algorithm that performs a unidirectional search on an FM index using trivial backtracking.
Definition unidirectional_search_algorithm.hpp:42
std::function< void(typename index_t::cursor_type const &)> delegate
A function object that stores the on-hit-delegate to be executed whenever a hit in the index is found...
Definition unidirectional_search_algorithm.hpp:125
unidirectional_search_algorithm()=default
Defaulted.
~unidirectional_search_algorithm()=default
Defaulted.
unidirectional_search_algorithm(unidirectional_search_algorithm &&)=default
Defaulted.
index_t const * index_ptr
A pointer to the fm index which is used to perform the unidirectional search.
Definition unidirectional_search_algorithm.hpp:122
unidirectional_search_algorithm(unidirectional_search_algorithm const &)=default
Defaulted.
unidirectional_search_algorithm & operator=(unidirectional_search_algorithm const &)=default
Defaulted.
unidirectional_search_algorithm & operator=(unidirectional_search_algorithm &&)=default
Defaulted.
uint8_t stratum
The stratum value if set.
Definition unidirectional_search_algorithm.hpp:128
typename traits_t::search_result_type search_result_type
The search result type.
Definition unidirectional_search_algorithm.hpp:47
void perform_search_by_hit_strategy(std::vector< typename index_t::cursor_type > &internal_hits, query_t &query, search_param error_state)
Calls search_trivial depending on the search strategy (hit configuration) given in the configuration.
Definition unidirectional_search_algorithm.hpp:145
unidirectional_search_algorithm(configuration_t const &cfg, index_t const &index)
Constructs from a configuration object and an index.
Definition unidirectional_search_algorithm.hpp:72
Configuration element to receive all hits with the best number of errors plus the given stratum....
Definition hit.hpp:107
@ none
The corresponding alignment coordinate will not be incrementable/decrementable.
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition alphabet/concept.hpp:152
error_type
An enumerator for the different error types used during the backtracking.
Definition unidirectional_search_algorithm.hpp:28
bool search_trivial(typename index_t::cursor_type cur, query_t &query, typename index_t::cursor_type::size_type const query_pos, search_param const error_left, error_type const prev_error)
Searches a query sequence in an index using trivial backtracking.
Definition unidirectional_search_algorithm.hpp:207
@ none
No error or match was enumerated yet.
@ matchmm
A match or a mismatch was enumerated.
@ deletion
A deletion was enumerated in previous backtracking step.
@ insertion
A insertion was enumerated in previous backtracking step.
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 seqan3::detail::search_traits.
Object grouping numbers of errors for different kind of error types.
Definition search_common.hpp:22
uint8_t insertion
Total number of insertion errors.
Definition search_common.hpp:28
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
static constexpr bool search_strata_hits
A flag indicating whether search should find strata hits.
Definition search_traits.hpp:62
static constexpr bool search_all_best_hits
A flag indicating whether search should find all best hits.
Definition search_traits.hpp:60
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
static constexpr bool search_all_hits
A flag indicating whether search should find all hits.
Definition search_traits.hpp:55
Forward declares seqan3::detail::test_accessor.