20 namespace seqan3::detail
26 template <u
int8_t nbr_blocks>
30 typedef std::array<size_t, nbr_blocks> blocks_length_type;
33 std::array<uint8_t, nbr_blocks> pi;
35 std::array<uint8_t, nbr_blocks> l;
37 std::array<uint8_t, nbr_blocks> u;
40 constexpr uint8_t blocks() const noexcept
52 typedef std::vector<size_t> blocks_length_type;
55 std::vector<uint8_t> pi;
57 std::vector<uint8_t> l;
59 std::vector<uint8_t> u;
62 uint8_t blocks() const noexcept
70 template <u
int8_t nbr_searches, u
int8_t nbr_blocks>
71 using search_scheme_type = std::array<search<nbr_blocks>, nbr_searches>;
75 using search_scheme_dyn_type = std::vector<search_dyn>;
86 template <u
int8_t min_error, u
int8_t max_error>
87 inline int constexpr optimum_search_scheme;
92 inline search_scheme_type<1, 1> constexpr optimum_search_scheme<0, 0>
98 inline search_scheme_type<2, 2> constexpr optimum_search_scheme<0, 1>
100 {{1, 2}, {0, 0}, {0, 1}},
101 {{2, 1}, {0, 1}, {0, 1}}
105 inline search_scheme_type<2, 2> constexpr optimum_search_scheme<1, 1>
107 {{1, 2}, {0, 1}, {0, 1}},
108 {{2, 1}, {0, 1}, {0, 1}}
112 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<0, 2>
114 {{1, 2, 3, 4}, {0, 0, 1, 1}, {0, 0, 2, 2}},
115 {{3, 2, 1, 4}, {0, 0, 0, 0}, {0, 1, 1, 2}},
116 {{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}
120 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<1, 2>
122 {{1, 2, 3, 4}, {0, 0, 0, 1}, {0, 0, 2, 2}},
123 {{3, 2, 1, 4}, {0, 0, 1, 1}, {0, 1, 1, 2}},
124 {{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}
128 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<2, 2>
130 {{4, 3, 2, 1}, {0, 0, 1, 2}, {0, 0, 2, 2}},
131 {{2, 3, 4, 1}, {0, 0, 0, 2}, {0, 1, 1, 2}},
132 {{1, 2, 3, 4}, {0, 0, 0, 2}, {0, 1, 2, 2}}
136 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<0, 3>
139 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 0}, {0, 0, 3, 3, 3}},
140 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
141 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
142 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
146 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<1, 3>
148 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 1}, {0, 0, 3, 3, 3}},
149 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
150 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
151 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
155 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<2, 3>
157 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 2}, {0, 0, 3, 3, 3}},
158 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 2}, {0, 1, 1, 2, 3}},
159 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
160 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
164 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<3, 3>
166 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 3}, {0, 0, 3, 3, 3}},
167 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 3}, {0, 1, 1, 2, 3}},
168 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 3}, {0, 1, 2, 2, 3}},
169 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
auto search(queries_t &&queries, index_t const &index, configuration_t const &cfg=search_cfg::default_configuration)
Search a query or a range of queries in an index.
Definition: search.hpp:104