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 "bmbuffer.h"`
`#include "bmrs.h"`
Include dependency graph for bm.h:

Go to the source code of this file.

## Data Structures

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
| Bit-block descriptor. 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...
struct | bm::bvector< Alloc >::allocation_policy
| memory allocation policy More...

## Namespaces

namespace | bm

## Macros

#define | BM_DECLARE_TEMP_BLOCK(x)
#define | BM_BORDER_TEST(blk, idx)
#define | BM_OR_OP(x)
#define | BM_XOR_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).
typedef bm::id_t | bm::bvector_size_type

## Functions

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

## 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); \
if (opt_mode == opt_compress) \
blockman_.optimize_bit_block(i, j+x, opt_mode); \
} \
else \
blockman_.zero_block(i, j+x); \
}

Definition at line 6585 of file bm.h.

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

## BM_BORDER_TEST

#define BM_BORDER_TEST | ( |  | blk,
|  |  | idx )

Value:
bool(blk[idx >> bm::set_word_shift] & (1u << (idx & bm::set_word_mask)))
bm::set_word_shift
const unsigned set_word_shift
Definition bmconst.h:72
bm::set_word_mask
const unsigned set_word_mask
Definition bmconst.h:73

Definition at line 2649 of file bm.h.

## BM_DECLARE_TEMP_BLOCK

#define BM_DECLARE_TEMP_BLOCK | ( |  | x | ) |

Value:
bm::bit_block_t x;
bm::bit_block_t
bit-block array wrapped into union for correct interpretation of 32-bit vs 64-bit access vs SIMD
Definition bmutil.h:59

Examples
  bv3vlogic.cpp, bvsetalgebra.cpp, inv_list.cpp, rscsample01.cpp, rscsample02.cpp, sample11.cpp, sample14.cpp, sample26.cpp, sample4.cpp, strsvsample01.cpp, strsvsample02.cpp, strsvsample03.cpp, strsvsample05.cpp, strsvsample06.cpp, strsvsample07.cpp, strsvsample09.cpp, svsample01.cpp, svsample02.cpp, svsample03.cpp, svsample08.cpp, xsample01.cpp, xsample02.cpp, xsample05.cpp, xsample07a.cpp, xsample08.cpp, and xsample09.cpp.

Definition at line 47 of file bm.h.

Referenced by assign_to_best_cluster(), assign_to_best_cluster_union(), bm::optimize_plan_builder< SVect, Lock >::build_plan(), bm::bvector< Alloc >::compare(), compute_adaptive_rsc_histogram(), compute_historgam(), compute_rsc_historgam(), compute_seq_group_union(), convert_bv2sv(), Demo1(), Demo2(), CSequenceColl::deserialize_k_mers(), bm::bv_ref_vector< bvector_type >::fill_alloc_digest(), generate_bvector(), generate_k_mers(), generate_test_data(), GenerateDemoVector(), bm::bvector< Alloc >::import_block(), main(), main(), make_BLOB(), bm::basic_bmatrix< BV >::optimize(), data_model::optimize(), SDemo2(), serialize_bvector(), Set3VL_ValueDemo(), Set3VL_ValueDemo2(), speed_test_bvs_index(), write_as_bvector(), write_as_rsc_svector(), and write_as_svector().

## 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 6419 of file bm.h.

Referenced by bm::bvector< Alloc >::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 6680 of file bm.h.

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

## BM_XOR_OP

#define BM_XOR_OP | ( |  | x | ) |

Value:
{ \
blk = blk_blk[j+x]; arg_blk = blk_blk_arg[j+x]; \
combine_operation_block_xor(i, j+x, blk, arg_blk); \
}

Definition at line 6492 of file bm.h.

Referenced by bm::bvector< Alloc >::combine_operation_xor().