Lines Matching refs:bv
211 marisa::BitVector bv;
213 ASSERT(bv.size() == 0);
214 ASSERT(bv.empty());
215 ASSERT(bv.total_size() == sizeof(marisa::UInt32) * 5);
222 bv.push_back(bit);
224 ASSERT(bv[i] == bits[i]);
227 ASSERT(bv.size() == bits.size());
228 ASSERT((size == 0) || !bv.empty());
230 bv.build();
234 ASSERT(bv[i] == bits[i]);
235 ASSERT(bv.rank0(i) == num_zeros);
236 ASSERT(bv.rank1(i) == num_ones);
237 ++(bv[i] ? num_ones : num_zeros);
240 ASSERT(bv.select0(i) == zeros[i]);
243 ASSERT(bv.select1(i) == ones[i]);
247 bv.write(stream);
248 bv.clear();
250 ASSERT(bv.size() == 0);
251 ASSERT(bv.empty());
252 ASSERT(bv.total_size() == sizeof(marisa::UInt32) * 5);
254 bv.read(stream);
256 ASSERT(bv.size() == bits.size());
260 ASSERT(bv[i] == bits[i]);
261 ASSERT(bv.rank0(i) == num_zeros);
262 ASSERT(bv.rank1(i) == num_ones);
263 ++(bv[i] ? num_ones : num_zeros);
266 ASSERT(bv.select0(i) == zeros[i]);
269 ASSERT(bv.select1(i) == ones[i]);