53template<
typename SV,
typename BV>
56 auto en = bv.get_enumerator(0);
59 cout <<
"<EMPTY>" << endl;
62 auto cnt = bv.count();
63 cout <<
"size=" << cnt <<
" ";
64 for (; en.valid(); ++en)
68 cout << idx <<
":" << v <<
", ";
119 scanner_u32.
find_gt(sv1, 1, bv_res);
126 scanner_u32.
find_lt(sv1, 0, bv_res);
133 scanner_i32.
find_ge(sv2, -1, bv_res);
140 scanner_i32.
find_le(sv2, 30, bv_res);
160 scanner_i32.
find_gt(sv2, 10, bv_res_gt);
161 scanner_i32.
find_le(sv2, -1, bv_res_le);
164 bv_res.
bit_or(bv_res_gt, bv_res_le);
168 bv_res.
bit_and(bv_res_gt, bv_res_le);
174 catch(std::exception& ex)
176 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
Sparse constainer sparse_vector<> for integer types using bit-transposition transform.
Algorithms for bm::sparse_vector.
pre-processor un-defines to avoid global space pollution (internal)
Bitvector Bit-vector container with runtime compression of bits.
bm::bvector< Alloc > & bit_or(const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)
3-operand OR : this := bv1 OR bv2
bm::bvector< Alloc > & bit_and(const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)
3-operand AND : this := bv1 AND bv2
void add_null()
add NULL (no-value) to the container
algorithms for sparse_vector scan/search
void find_lt(const SV &sv, value_type val, bvector_type &bv_out)
find all elements sparse vector element less (<) than value
void find_ge(const SV &sv, value_type val, bvector_type &bv_out)
find all elements sparse vector element greater or equal (>=) than value
void find_le(const SV &sv, value_type val, bvector_type &bv_out)
find all elements sparse vector element less or equal (<=) than value
void find_gt(const SV &sv, value_type val, bvector_type &bv_out)
find all elements sparse vector element greater (>) than value
void find_range(const SV &sv, value_type from, value_type to, bvector_type &bv_out)
find all elements sparse vector element in closed range [left..right] interval
succinct sparse vector with runtime compression using bit-slicing / transposition method
back_insert_iterator get_back_inserter()
Provide back insert iterator Back insert iterator implements buffered insertion, which is faster,...
@ use_null
support "non-assigned" or "NULL" logic
bm::sparse_vector< unsigned, bm::bvector<> > svector_u32
bm::sparse_vector< int, bm::bvector<> > svector_i32
void PrintResults(const SV &sv, const BV &bv)