85 template <fm_index_specialisation index_t,
typename queries_t,
typename configuration_t = decltype(search_cfg::default_configuration)>
86 inline auto search(queries_t && queries,
87 index_t
const & index,
90 if constexpr(dimension_v<queries_t> == 1u)
92 static_assert(std::ranges::random_access_range<queries_t>,
"The query sequence must model random_access_range.");
93 static_assert(std::ranges::sized_range<queries_t>,
"The query sequence must model sized_range.");
97 static_assert(std::ranges::forward_range<queries_t>,
"The query collection must model forward_range.");
98 static_assert(std::ranges::sized_range<queries_t>,
"The query collection must model sized_range.");
100 "Elements of the query collection must model random_access_range.");
102 "Elements of the query collection must model sized_range.");
106 "cfg must be a specialisation of seqan3::configuration.");
110 if constexpr (cfg_t::template exists<search_cfg::max_error>())
112 auto & [total, subs, ins, del] = get<search_cfg::max_error>(cfg).value;
114 throw std::invalid_argument(
"The substitution error threshold is higher than the total error threshold.");
116 throw std::invalid_argument(
"The insertion error threshold is higher than the total error threshold.");
118 throw std::invalid_argument(
"The deletion error threshold is higher than the total error threshold.");
120 else if constexpr (cfg_t::template exists<search_cfg::max_error_rate>())
122 auto & [total, subs, ins, del] = get<search_cfg::max_error_rate>(cfg).value;
124 throw std::invalid_argument(
"The substitution error threshold is higher than the total error threshold.");
126 throw std::invalid_argument(
"The insertion error threshold is higher than the total error threshold.");
128 throw std::invalid_argument(
"The deletion error threshold is higher than the total error threshold.");
131 if constexpr (cfg_t::template exists<search_cfg::mode>())
133 if constexpr (cfg_t::template exists<search_cfg::output>())
134 return detail::search_all(index, queries, cfg);
141 if constexpr (cfg_t::template exists<search_cfg::output>())
142 return detail::search_all(index, queries, cfg2);
149 template <fm_index_specialisation index_t,
typename configuration_t = decltype(search_cfg::default_configuration)>
150 inline auto search(
char const *
const queries,
151 index_t
const & index,
158 template <fm_index_specialisation index_t,
typename configuration_t = decltype(search_cfg::default_configuration)>
160 index_t
const & index,
166 return search(query, index, cfg);