Lines Matching refs:bv
215 marisa_alpha::BitVector bv;
217 ASSERT(bv.size() == 0);
218 ASSERT(bv.empty());
219 ASSERT(bv.total_size() == sizeof(marisa_alpha::UInt32) * 5);
226 bv.push_back(bit);
228 ASSERT(bv[i] == bits[i]);
231 ASSERT(bv.size() == bits.size());
232 ASSERT((size == 0) || !bv.empty());
234 bv.build();
238 ASSERT(bv[i] == bits[i]);
239 ASSERT(bv.rank0(i) == num_zeros);
240 ASSERT(bv.rank1(i) == num_ones);
241 ++(bv[i] ? num_ones : num_zeros);
244 ASSERT(bv.select0(i) == zeros[i]);
247 ASSERT(bv.select1(i) == ones[i]);
251 bv.write(stream);
252 bv.clear();
254 ASSERT(bv.size() == 0);
255 ASSERT(bv.empty());
256 ASSERT(bv.total_size() == sizeof(marisa_alpha::UInt32) * 5);
258 bv.read(stream);
260 ASSERT(bv.size() == bits.size());
264 ASSERT(bv[i] == bits[i]);
265 ASSERT(bv.rank0(i) == num_zeros);
266 ASSERT(bv.rank1(i) == num_ones);
267 ++(bv[i] ? num_ones : num_zeros);
270 ASSERT(bv.select0(i) == zeros[i]);
273 ASSERT(bv.select1(i) == ones[i]);