BitMagic-C++
Data Structures | Namespaces | Macros | Typedefs | Functions
bm.h File Reference

Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators. More...

#include <iterator>
#include <initializer_list>
#include <stdexcept>
#include <limits.h>
#include "bmdef.h"
#include "bmconst.h"
#include "bmsimd.h"
#include "bmfwd.h"
#include "bmfunc.h"
#include "encoding.h"
#include "bmalloc.h"
#include "bmblocks.h"
#include "bmundef.h"
Include dependency graph for bm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bm::rs_index
 Rank-Select acceleration index. More...
 
class  bm::bvector< Alloc >
 Bitvector Bit-vector container with runtime compression of bits. More...
 
struct  bm::bvector< Alloc >::statistics
 Statistical information about bitset's memory allocation details. More...
 
class  bm::bvector< Alloc >::reference
 Class reference implements an object for bit assignment. More...
 
class  bm::bvector< Alloc >::iterator_base
 Base class for all iterators. More...
 
struct  bm::bvector< Alloc >::iterator_base::bitblock_descr
 Information about current bitblock. More...
 
struct  bm::bvector< Alloc >::iterator_base::dgap_descr
 Information about current DGAP block. More...
 
union  bm::bvector< Alloc >::iterator_base::block_descr
 
class  bm::bvector< Alloc >::insert_iterator
 Output iterator iterator designed to set "ON" bits based on input sequence of integers (bit indeces). More...
 
class  bm::bvector< Alloc >::bulk_insert_iterator
 Output iterator iterator designed to set "ON" bits based on input sequence of integers. More...
 
class  bm::bvector< Alloc >::enumerator
 Constant iterator designed to enumerate "ON" bits. More...
 
class  bm::bvector< Alloc >::counted_enumerator
 Constant iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount, ie number of ON bits starting from the position 0 in the bit string up to the currently enumerated bit. More...
 
class  bm::bvector< Alloc >::mem_pool_guard
 
struct  bm::bvector< Alloc >::allocation_policy
 memory allocation policy More...
 

Namespaces

 bm
 

Macros

#define BM_DECLARE_TEMP_BLOCK(x)   bm::bit_block_t x;
 
#define BM_OR_OP(x)
 
#define BM_AND_OP(x)
 
#define BM_SUB_OP(x)
 

Typedefs

typedef int(* bit_visitor_callback_type) (void *handle_ptr, bm::id_t bit_idx)
 Callback type to visit (callback style) bits in bit-vector(s) More...
 

Functions

template<class Alloc >
bvector< Alloc > bm::operator & (const bvector< Alloc > &v1, const bvector< Alloc > &v2)
 
template<class Alloc >
bvector< Alloc > bm::operator| (const bvector< Alloc > &v1, const bvector< Alloc > &v2)
 
template<class Alloc >
bvector< Alloc > bm::operator^ (const bvector< Alloc > &v1, const bvector< Alloc > &v2)
 
template<class Alloc >
bvector< Alloc > bm::operator- (const bvector< Alloc > &v1, const bvector< Alloc > &v2)
 

Detailed Description

Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.

Definition in file bm.h.

Macro Definition Documentation

◆ BM_AND_OP

#define BM_AND_OP (   x)
Value:
if (0 != (blk = blk_blk[j+x])) \
{ \
if (0 != (arg_blk = blk_blk_arg[j+x])) \
combine_operation_block_and(i, j+x, blk, arg_blk); \
else \
blockman_.zero_block(i, j+x); \
}

Definition at line 4348 of file bm.h.

Referenced by bm::bvector<>::combine_operation_and().

◆ BM_DECLARE_TEMP_BLOCK

#define BM_DECLARE_TEMP_BLOCK (   x)    bm::bit_block_t x;

◆ BM_OR_OP

#define BM_OR_OP (   x)
Value:
{ \
blk = blk_blk[j+x]; arg_blk = blk_blk_arg[j+x]; \
if (blk != arg_blk) \
combine_operation_block_or(i, j+x, blk, arg_blk); \
}

Definition at line 4286 of file bm.h.

Referenced by bm::bvector<>::combine_operation_or().

◆ BM_SUB_OP

#define BM_SUB_OP (   x)
Value:
if ((0 != (blk = blk_blk[j+x])) && (0 != (arg_blk = blk_blk_arg[j+x]))) \
combine_operation_block_sub(i, j+x, blk, arg_blk);

Definition at line 4425 of file bm.h.

Referenced by bm::bvector<>::combine_operation_sub().