49 template <u
int8_t nbr_blocks>
55 typedef std::array<size_t, nbr_blocks> blocks_length_type;
58 std::array<uint8_t, nbr_blocks> pi;
60 std::array<uint8_t, nbr_blocks> l;
62 std::array<uint8_t, nbr_blocks> u;
65 constexpr uint8_t blocks() const noexcept
76 typedef std::vector<size_t> blocks_length_type;
79 std::vector<uint8_t> pi;
81 std::vector<uint8_t> l;
83 std::vector<uint8_t> u;
86 uint8_t blocks() const noexcept
93 template <u
int8_t nbr_searches, u
int8_t nbr_blocks>
94 using search_scheme_type = std::array<search<nbr_blocks>, nbr_searches>;
97 using search_scheme_dyn_type = std::vector<search_dyn>;
107 template <u
int8_t min_error, u
int8_t max_error>
108 inline int constexpr optimum_search_scheme;
113 inline search_scheme_type<1, 1> constexpr optimum_search_scheme<0, 0>
119 inline search_scheme_type<2, 2> constexpr optimum_search_scheme<0, 1>
121 {{1, 2}, {0, 0}, {0, 1}},
122 {{2, 1}, {0, 1}, {0, 1}}
126 inline search_scheme_type<2, 2> constexpr optimum_search_scheme<1, 1>
128 {{1, 2}, {0, 1}, {0, 1}},
129 {{2, 1}, {0, 1}, {0, 1}}
133 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<0, 2>
135 {{1, 2, 3, 4}, {0, 0, 1, 1}, {0, 0, 2, 2}},
136 {{3, 2, 1, 4}, {0, 0, 0, 0}, {0, 1, 1, 2}},
137 {{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}
141 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<1, 2>
143 {{1, 2, 3, 4}, {0, 0, 0, 1}, {0, 0, 2, 2}},
144 {{3, 2, 1, 4}, {0, 0, 1, 1}, {0, 1, 1, 2}},
145 {{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}
149 inline search_scheme_type<3, 4> constexpr optimum_search_scheme<2, 2>
151 {{4, 3, 2, 1}, {0, 0, 1, 2}, {0, 0, 2, 2}},
152 {{2, 3, 4, 1}, {0, 0, 0, 2}, {0, 1, 1, 2}},
153 {{1, 2, 3, 4}, {0, 0, 0, 2}, {0, 1, 2, 2}}
157 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<0, 3>
160 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 0}, {0, 0, 3, 3, 3}},
161 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
162 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
163 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
167 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<1, 3>
169 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 1}, {0, 0, 3, 3, 3}},
170 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
171 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
172 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
176 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<2, 3>
178 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 2}, {0, 0, 3, 3, 3}},
179 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 2}, {0, 1, 1, 2, 3}},
180 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
181 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
185 inline search_scheme_type<4, 5> constexpr optimum_search_scheme<3, 3>
187 {{5, 4, 3, 2, 1}, {0, 0, 0, 0, 3}, {0, 0, 3, 3, 3}},
188 {{3, 4, 5, 2, 1}, {0, 0, 1, 1, 3}, {0, 1, 1, 2, 3}},
189 {{2, 3, 4, 5, 1}, {0, 0, 0, 2, 3}, {0, 1, 2, 2, 3}},
190 {{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}
auto search(index_t const &index, queries_t &&queries, configuration_t const &cfg)
Search a query or a range of queries in an index.
Definition: search.hpp:82
Definition: aligned_sequence_concept.hpp:288