A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classbm_1_1bvector.html below:

NCBI C++ ToolKit: bm::bvector< Alloc

Search Toolkit Book for bm::bvector

Bitvector Bit-vector container with runtime compression of bits. More...

#include <util/bitset/bm.h>

  bvector (strategy strat=BM_BIT, const gap_word_t *glevel_len=bm::gap_len_table< true >::_len, size_type bv_size=bm::id_max, const Alloc &alloc=Alloc())   Constructs bvector class. More...
    bvector (size_type bv_size, strategy strat=BM_BIT, const gap_word_t *glevel_len=bm::gap_len_table< true >::_len, const Alloc &alloc=Alloc())   Constructs bvector class. More...
    bvector (const bvector< Alloc > &bvect)   Copy constructor. More...
    bvector (const bvector< Alloc > &bvect, size_type left, size_type right)   Copy constructor for range copy [left..right]. More...
    bvector (const bvector< Alloc > &bvect, bm::finalization is_final)   Copy-constructor for mutable/immutable initialization. More...
    ~bvector () noexcept   void  init ()   Explicit post-construction initialization. Must be caled to make sure safe use of *_no_check() methods. More...
  void  init (unsigned top_size, bool alloc_subs)   Explicit post-construction initialization. Must be caled right after construction strickly before any modificating calls to make sure safe use of *_no_check() methods. This init can do pre-allocation of top level structures. More...
  bvectoroperator= (const bvector< Alloc > &bvect)   Copy assignment operator. More...
    bvector (bvector< Alloc > &&bvect) noexcept   Move constructor. More...
    bvector (std::initializer_list< size_type > il)   Brace constructor. More...
  bvectoroperator= (bvector< Alloc > &&bvect) noexcept   Move assignment operator. More...
  void  copy (const bvector< Alloc > &bvect, bm::finalization is_final)   Copy bvector from the argument bvector. More...
  void  move_from (bvector< Alloc > &bvect) noexcept   Move bvector content from another bvector. More...
  void  swap (bvector< Alloc > &bvect) noexcept   Exchanges content of bv and this bvector. More...
  void  merge (bm::bvector< Alloc > &bvect)   Merge/move content from another vector. More...
  reference  operator[] (size_type n)   bool  operator[] (size_type n) const noexcept   void  operator&= (const bvector< Alloc > &bv)   void  operator^= (const bvector< Alloc > &bv)   void  operator|= (const bvector< Alloc > &bv)   void  operator-= (const bvector< Alloc > &bv)   bool  operator< (const bvector< Alloc > &bv) const   bool  operator<= (const bvector< Alloc > &bv) const   bool  operator> (const bvector< Alloc > &bv) const   bool  operator>= (const bvector< Alloc > &bv) const   bool  operator== (const bvector< Alloc > &bv) const noexcept   bool  operator!= (const bvector< Alloc > &bv) const noexcept   bvector< Allocoperator~ () const   Alloc  get_allocator () const   void  set_allocator_pool (allocator_pool_type *pool_ptr) noexcept   Set allocator pool for local (non-th readed) memory cyclic(lots of alloc-free ops) opertations. More...
  allocator_pool_typeget_allocator_pool () noexcept   Get curent allocator pool (if set) More...
  void  freeze ()   Turn current vector to read-only (immutable vector). More...
  bool  is_ro () const noexcept   Returns true if vector is read-only. More...
  bool  set_bit (size_type n, bool val=true)   Sets bit n. More...
  bool  set_bit_and (size_type n, bool val=true)   Sets bit n using bit AND with the provided value. More...
  bool  inc (size_type n)   Increment the specified element. More...
  bool  set_bit_conditional (size_type n, bool val, bool condition)   Sets bit n only if current value equals the condition. More...
  bvector< Alloc > &  set (size_type n, bool val=true)   Sets bit n if val is true, clears bit n if val is false. More...
  bvector< Alloc > &  set ()   Sets every bit in this bitset to 1. More...
  void  set (const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)   Set list of bits in this bitset to 1. More...
  void  keep (const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)   Keep list of bits in this bitset, others are cleared. More...
  void  clear (const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)   clear list of bits in this bitset More...
  void  swap (size_type idx1, size_type idx2)   swap values of bits More...
  void  set_bit_no_check (size_type n)   Set bit without checking preconditions (size, etc) More...
  bool  set_bit_no_check (size_type n, bool val)   Set specified bit without checking preconditions (size, etc) More...
  bvector< Alloc > &  set_range (size_type left, size_type right, bool value=true)   Sets all bits in the specified closed interval [left,right] Interval must be inside the bvector's size. This method DOES NOT resize vector. More...
  void  clear_range (size_type left, size_type right)   Sets all bits to zero in the specified closed interval [left,right] Interval must be inside the bvector's size. This method DOES NOT resize vector. More...
  void  keep_range (size_type left, size_type right)   Sets all bits to zero outside of the closed interval [left,right] Expected result: 00000...0[left, right]0....0000. More...
  void  copy_range (const bvector< Alloc > &bvect, size_type left, size_type right)   Copy all bits in the specified closed interval [left,right]. More...
  bool  clear_bit (size_type n)   Clears bit n. More...
  void  clear_bit_no_check (size_type n)   Clears bit n without precondiion checks. More...
  void  clear (bool free_mem=true) noexcept   Clears every bit in the bitvector. More...
  bvector< Alloc > &  reset () noexcept   Clears every bit in the bitvector. More...
  bvector< Alloc > &  flip (size_type n)   Flips bit n. More...
  bvector< Alloc > &  flip ()   Flips all bits. More...
  insert_iterator  inserter ()  

By default bvector is dynamically sized, manual control methods available

size_type  size () const noexcept   Returns bvector's capacity (number of bits it can store) More...
  void  resize (size_type new_size)   Change size of the bvector. More...
  size_type  count () const noexcept   population count (count of ON bits) More...
  block_idx_type  count_blocks (unsigned *arr) const noexcept   Computes bitcount values for all bvector blocks. More...
  size_type  count_range (size_type left, size_type right, const rs_index_type &rs_idx) const noexcept   Returns count of 1 bits in the given range [left..right] Uses rank-select index to accelerate the search. More...
  size_type  count_range (size_type left, size_type right) const noexcept   Returns count of 1 bits in the given range [left..right]. More...
  size_type  count_range_no_check (size_type left, size_type right) const noexcept   size_type  count_range_no_check (size_type left, size_type right, const rs_index_type &rs_idx) const noexcept   bool  is_all_one_range (size_type left, size_type right) const noexcept   Returns true if all bits in the range are 1s (saturated interval) Function uses closed interval [left, right]. More...
  bool  any_range (size_type left, size_type right) const noexcept   Returns true if any bits in the range are 1s (non-empty interval) Function uses closed interval [left, right]. More...
  void  build_rs_index (rs_index_type *rs_idx, bvector< Alloc > *bv_blocks=0) const   compute running total of all blocks in bit vector (rank-select index) More...
  size_type  count_to (size_type n, const rs_index_type &rs_idx) const noexcept   Returns count of 1 bits (population) in [0..right] range. More...
  size_type  rank (size_type n, const rs_index_type &rs_idx) const noexcept   Returns rank of specified bit position (same as count_to()) More...
  size_type  rank_corrected (size_type n, const rs_index_type &rs_idx) const noexcept   Returns rank corrceted by the requested border value (as -1) More...
  size_type  count_to_test (size_type n, const rs_index_type &rs_idx) const noexcept   popcount in [0..right] range if test(right) == true More...
  size_type  recalc_count () noexcept   void  forget_count () noexcept   bool  get_bit (size_type n) const noexcept   returns true if bit n is set and false is bit n is 0. More...
  bool  test (size_type n) const noexcept   returns true if bit n is set and false is bit n is 0. More...
  bool  shift_right ()   Shift right by 1 bit, fill with zero return carry out. More...
  bool  shift_left ()   Shift left by 1 bit, fill with zero return carry out. More...
  bool  insert (size_type n, bool value)   Insert bit into specified position All the vector content after insert position is shifted right. More...
  void  erase (size_type n)   Erase bit in the specified position All the vector content after erase position is shifted left. More...
  bool  any () const noexcept   Returns true if any bits in this bitset are set, and otherwise returns false. More...
  bool  none () const noexcept   Returns true if no bits are set, otherwise returns false. More...
  bool  empty () const noexcept   Returns true if the set is empty (no bits are set, otherwise returns false) Please note that this is NOT a size check, it is an empty SET check (absense of 1s) More...
  bool  find (size_type &pos) const noexcept   Finds index of first 1 bit. More...
  bool  find (size_type from, size_type &pos) const noexcept   Find index of 1 bit starting from position. More...
  size_type  get_first () const noexcept   find first 1 bit in vector. Function may return 0 and this requires an extra check if bit 0 is actually set or bit-vector is empty More...
  size_type  get_next (size_type prev) const noexcept   Finds the number of the next bit ON. More...
  size_type  extract_next (size_type prev)   Finds the number of the next bit ON and sets it to 0. More...
  bool  find_reverse (size_type &pos) const noexcept   Finds last index of 1 bit. More...
  bool  find_reverse (size_type from, size_type &pos) const noexcept   Reverse finds next(prev) index of 1 bit. More...
  bool  find_range (size_type &first, size_type &last) const noexcept   Finds dynamic range of bit-vector [first, last]. More...
  bool  find_rank (size_type rank, size_type from, size_type &pos) const noexcept   Find bit-vector position for the specified rank(bitcount) More...
  bool  find_rank (size_type rank, size_type from, size_type &pos, const rs_index_type &rs_idx) const noexcept   Find bit-vector position for the specified rank(bitcount) More...
  bool  select (size_type rank, size_type &pos, const rs_index_type &rs_idx) const noexcept   select bit-vector position for the specified rank(bitcount) More...
  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 More...
  bm::bvector< Alloc > &  bit_xor (const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)   3-operand XOR : this := bv1 XOR bv2 More...
  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 More...
  bm::bvector< Alloc > &  bit_or_and (const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)   3-operand AND where result is ORed into the terget vector : this |= bv1 AND bv2 TARGET := TARGET OR (BV1 AND BV2) More...
  bm::bvector< Alloc > &  bit_sub (const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)   3-operand SUB : this := bv1 MINUS bv2 SUBtraction is also known as AND NOT More...
  bm::bvector< Alloc > &  bit_or (const bm::bvector< Alloc > &bv)   2 operand logical OR More...
  bm::bvector< Alloc > &  bit_and (const bm::bvector< Alloc > &bv, optmode opt_mode=opt_none)   2 operand logical AND More...
  bm::bvector< Alloc > &  bit_xor (const bm::bvector< Alloc > &bv)   2 operand logical XOR More...
  bm::bvector< Alloc > &  bit_sub (const bm::bvector< Alloc > &bv)   2 operand logical SUB(AND NOT). Also known as MINUS. More...
  bvector< Alloc > &  invert ()   Invert/NEG all bits It should be noted, invert is affected by size() if size is set - it only inverts [0..size-1] bits. More...
  void  combine_operation (const bm::bvector< Alloc > &bvect, bm::operation opcode)   perform a set-algebra operation by operation code More...
  void  combine_operation_or (const bm::bvector< Alloc > &bvect)   perform a set-algebra operation OR More...
  void  combine_operation_and (const bm::bvector< Alloc > &bvect, optmode opt_mode)   perform a set-algebra operation AND More...
  void  combine_operation_sub (const bm::bvector< Alloc > &bvect)   perform a set-algebra operation MINUS (AND NOT) More...
  void  combine_operation_xor (const bm::bvector< Alloc > &bvect)   perform a set-algebra operation XOR More...
  enumerator  first () const   Returns enumerator pointing on the first non-zero bit. More...
  enumerator  end () const   Returns enumerator pointing on the next bit after the last. More...
  enumerator  get_enumerator (size_type pos) const   Returns enumerator pointing on specified or the next available bit. More...
  void  calc_stat (struct bm::bvector< Alloc >::statistics *st) const noexcept   Calculates bitvector statistics. More...
  void  set_new_blocks_strat (strategy strat)   Sets new blocks allocation strategy. More...
  strategy  get_new_blocks_strat () const noexcept   Returns blocks allocation strategy. More...
  void  optimize (bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)   Optimize memory bitvector's memory allocation. More...
  void  optimize_range (size_type left, size_type right, bm::word_t *temp_block, optmode opt_mode=opt_compress)   void  optimize_gap_size ()   Optimize sizes of GAP blocks. More...
  void  set_gap_levels (const gap_word_t *glevel_len)   Sets new GAP lengths table. All GAP blocks will be reallocated to match the new scheme. More...
  bool  is_init () const noexcept   Return true if bvector is initialized at all. More...
  void  fill_alloc_digest (bvector< Alloc > &bv_blocks) const   Calculate blocks digest vector (for diagnostics purposes) 1 is added if NB is a real, allocated block. More...
  int  compare (const bvector< Alloc > &bvect) const noexcept   Lexicographical comparison with a bitvector. More...
  bool  equal (const bvector< Alloc > &bvect) const noexcept   Equal comparison with an agr bit-vector. More...
  bool  find_first_mismatch (const bvector< Alloc > &bvect, size_type &pos, size_type search_to=bm::id_max) const noexcept   Find index of first bit different between this and the agr vector. More...
  blocks_manager_type  blockman_   bitblocks manager More...
  strategy  new_blocks_strat_   block allocation strategy More...
  size_type  size_   size in bits More...
  void  combine_operation_with_block (block_idx_type nb, const bm::word_t *arg_blk, bool arg_gap, bm::operation opcode)   const blocks_manager_typeget_blocks_manager () const noexcept   get access to memory manager (internal) Use only if you are BitMagic library More...
  blocks_manager_typeget_blocks_manager () noexcept   get access to memory manager (internal) Use only if you are BitMagic library More...
  void  import (const size_type *ids, size_type ids_size, bm::sort_order sorted_idx)   Import integers (set bits). More...
  void  import_sorted (const size_type *ids, const size_type ids_size, bool opt_flag)   Import sorted integers (set bits). More...
  void  set_range_no_check (size_type left, size_type right)   Set range without validity/bounds checking. More...
  void  clear_range_no_check (size_type left, size_type right)   Clear range without validity/bounds checking. More...
  static void  throw_bad_alloc ()   void  sync_size ()   Syncronize size if it got extended due to bulk import. More...
  void  import_block (const size_type *ids, block_idx_type nblock, size_type start, size_type stop)   size_type  check_or_next (size_type prev) const noexcept   bool  gap_block_set (bm::gap_word_t *gap_blk, bool val, block_idx_type nblock, unsigned nbit)   set bit in GAP block with GAP block length control More...
  void  gap_block_set_no_ret (bm::gap_word_t *gap_blk, bool val, block_idx_type nblock, unsigned nbit)   set bit in GAP block with GAP block length control More...
  size_type  check_or_next_extract (size_type prev)   check if specified bit is 1, and set it to 0 if specified bit is 0, scan for the next 1 and returns it if no 1 found returns 0 More...
  bool  and_bit_no_check (size_type n, bool val)   AND specified bit without checking preconditions (size, etc) More...
  bool  set_bit_conditional_impl (size_type n, bool val, bool condition)   void  combine_operation_with_block (block_idx_type nb, bool gap, bm::word_t *blk, const bm::word_t *arg_blk, bool arg_gap, bm::operation opcode)   bool  combine_operation_block_or (unsigned i, unsigned j, const bm::word_t *arg_blk1, const bm::word_t *arg_blk2)   bool  combine_operation_block_xor (unsigned i, unsigned j, const bm::word_t *arg_blk1, const bm::word_t *arg_blk2)   bool  combine_operation_block_and (unsigned i, unsigned j, const bm::word_t *arg_blk1, const bm::word_t *arg_blk2)   bool  combine_operation_block_and_or (unsigned i, unsigned j, const bm::word_t *arg_blk1, const bm::word_t *arg_blk2)   bool  combine_operation_block_sub (unsigned i, unsigned j, const bm::word_t *arg_blk1, const bm::word_t *arg_blk2)   void  combine_operation_block_or (unsigned i, unsigned j, bm::word_t *blk, const bm::word_t *arg_blk)   void  combine_operation_block_xor (unsigned i, unsigned j, bm::word_t *blk, const bm::word_t *arg_blk)   void  combine_operation_block_and (unsigned i, unsigned j, bm::word_t *blk, const bm::word_t *arg_blk)   void  combine_operation_block_sub (unsigned i, unsigned j, bm::word_t *blk, const bm::word_t *arg_blk)   void  copy_range_no_check (const bvector< Alloc > &bvect, size_type left, size_type right)   void  keep_range_no_check (size_type left, size_type right)   Clear outside the range without validity/bounds checking. More...
  bool  test_first_block_bit (block_idx_type nb) const noexcept   Return value of first bit in the block. More...
  static size_type  block_count_to (const bm::word_t *block, block_idx_type nb, unsigned nbit_right, const rs_index_type &rs_idx) noexcept   Compute rank in bit-block using rank-select index. More...
  static size_type  gap_count_to (const bm::gap_word_t *gap_block, block_idx_type nb, unsigned nbit_right, const rs_index_type &rs_idx, bool test_set=false) noexcept   Compute rank in GAP block using rank-select index. More...
  template<class Alloc>
class bm::bvector< Alloc >

Bitvector Bit-vector container with runtime compression of bits.

Definition at line 114 of file bm.h.

◆ allocator_pool_type

Definition at line 118 of file bm.h.

◆ allocator_type

Definition at line 117 of file bm.h.

◆ block_idx_type

Definition at line 120 of file bm.h.

◆ blocks_count

Definition at line 815 of file bm.h.

◆ blocks_manager_type

Definition at line 119 of file bm.h.

◆ const_reference

Definition at line 233 of file bm.h.

◆ rs_index_type

Definition at line 816 of file bm.h.

◆ size_type

Definition at line 121 of file bm.h.

◆ optmode

Optimization mode Every next level means additional checks (better compression vs time)

See also
optimize
Enumerator opt_none 

no optimization

opt_free_0 

Free unused 0 blocks.

opt_free_01 

Free unused 0 and 1 blocks.

opt_compress 

compress blocks when possible (GAP/prefix sum)

Definition at line 132 of file bm.h.

◆ bvector() [1/7]

Constructs bvector class.

Parameters
strat - operation mode strategy, BM_BIT - default strategy, bvector use plain bitset blocks, (performance oriented strategy). BM_GAP - memory effitent strategy, bvector allocates blocks as array of intervals(gaps) and convert blocks into plain bitsets only when enthropy grows. glevel_len bv_size alloc - alllocator for this instance
See also
bm::gap_len_table bm::gap_len_table_min set_new_blocks_strat

Definition at line 843 of file bm.h.

◆ bvector() [2/7]

Constructs bvector class.

Definition at line 855 of file bm.h.

◆ bvector() [3/7]

Copy constructor.

Definition at line 867 of file bm.h.

◆ bvector() [4/7]

Copy constructor for range copy [left..right].

See also
copy_range

Definition at line 877 of file bm.h.

◆ bvector() [5/7]

Copy-constructor for mutable/immutable initialization.

Definition at line 892 of file bm.h.

◆ ~bvector()

Definition at line 906 of file bm.h.

◆ bvector() [6/7]

Move constructor.

Definition at line 940 of file bm.h.

◆ bvector() [7/7]

Brace constructor.

Definition at line 950 of file bm.h.

◆ and_bit_no_check()

AND specified bit without checking preconditions (size, etc)

Definition at line 4836 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set(), bm::gap_test_unr(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, mask, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and val.

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

◆ any()

template<typename Alloc >

Returns true if any bits in this bitset are set, and otherwise returns false.

Returns
true if any bit is set

Definition at line 2451 of file bm.h.

References bm::bvector< Alloc >::blockman_, bm::for_each_nzblock_if(), bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by CNSAffinityRegistry::AddClientToAffinities(), agg_shift_right_and(), AggregatorTest(), AndOperationsTest(), CJobStatusTracker::AnyPending(), BvectorEraseTest(), BvectorShiftTest(), SNSJobsAffinity::CanBeDeleted(), SNSGroupJobs::CanBeDeleted(), SRemoteNodeData::CancelWaiting(), CSeqTable_multi_data::ChangeToBit(), CNSNotificationList::CheckOutdatedJobs(), CheckVectors(), SRemoteNodeData::ClearPreferredAffinities(), CQueue::ClearWorkerNode(), CQueue::Dump(), CNSAffinityRegistry::Dump(), CNSGroupsRegistry::Dump(), bm::bvector< >::empty(), EmptyBVTest(), CBDB_Cache::EvaluateTimeLine(), CJobStatusTracker::GetMinJobID(), GroupByTest(), CNSClient::HasPreferredAffinities(), CNSClient::HasWaitAffinities(), KeepRangeTest(), bm::bvector< >::none(), CNSNotificationList::Notify(), CQueue::NotifyListenersPeriodically(), SNSNotificationAttributes::Print(), CNSClient::Print(), ResizeTest(), CNSClientsRegistry::SetPreferredAffinities(), CNSAffinityRegistry::SetWaitClientForAffinities(), StressTestAggregatorAND(), StressTestAggregatorAND_SUB(), StressTestAggregatorShiftAND(), SubOperationsTest(), TestBlockAND(), TestBlockSUB(), TestCompressedSparseVectorScan(), TestFindDiff(), TestHeapVector(), TestSignedSparseVectorScan(), TestSparseVectorAlgo(), TestSparseVectorScan(), CQueue::TouchClientsRegistry(), CNSClientsRegistry::UpdatePreferredAffinities(), CQueue::x_DumpJobs(), CQueue::x_FindOutdatedJobForReading(), CQueue::x_FindOutdatedPendingJob(), CQueue::x_FindVacantJob(), CQueue::x_NoMoreReadJobs(), CNSGroupsRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintOne(), CNSAffinityRegistry::x_PrintOne(), CNSAffinityRegistry::x_RemoveClientFromAffinities(), and XorOperationsTest().

◆ any_range()

template<typename Alloc >

Returns true if any bits in the range are 1s (non-empty interval) Function uses closed interval [left, right].

Parameters
left - index of first bit start checking right - index of last bit
Returns
true if at least 1 bits is set
See also
is_all_one_range, count_range

Definition at line 3424 of file bm.h.

References bm::block_any(), bm::block_any_range(), bm::bvector< Alloc >::blockman_, BM_ASSERT, FULL_BLOCK_FAKE_ADDR, bm::gap_max_bits, bm::blocks_manager< Alloc >::get_block(), bm::get_block_coord(), i, bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_sub_array_size, bm::bvector< Alloc >::test(), bm::blocks_manager< Alloc >::top_block_size(), bm::blocks_manager< Alloc >::top_blocks_root(), and bm::xor_swap().

Referenced by FillSetsIntervals(), Intervals_RangesTest(), IsAllOneRangeTest(), and verify_all_one_ranges().

◆ bit_and() [1/2]

2 operand logical AND

Parameters
bv - argument vector opt_mode - set an immediate optimization

Definition at line 1802 of file bm.h.

◆ bit_and() [2/2]

3-operand AND : this := bv1 AND bv2

Parameters
bv1 - Argument vector 1 bv2 - Argument vector 2 opt_mode - optimization compression (when it is performed on the fly it is faster than a separate call to optimize()
See also
optimize, bit_and

Definition at line 6118 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::bvector< Alloc >::combine_operation_block_and(), bm::blocks_manager< Alloc >::deinit_tree(), bm::blocks_manager< Alloc >::free_temp_block(), bm::blocks_manager< Alloc >::free_top_subblock(), FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::bvector< Alloc >::get_blocks_manager(), i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::opt_none, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AndOperationsTest(), bm::bvector< Alloc >::bit_or_and(), DesrializationTest2(), EmptyBVTest(), bm::bvector< Alloc >::keep(), MutationOperationsTest(), bm::operator&(), bm::bvector< >::operator&=(), SerializationOperation(), StressTest(), StressTestAggregatorAND(), and StressTestAggregatorAND_SUB().

◆ bit_or() [1/2]

2 operand logical OR

Parameters

Definition at line 1790 of file bm.h.

◆ bit_or() [2/2]

3-operand OR : this := bv1 OR bv2

Parameters
bv1 - Argument vector 1 bv2 - Argument vector 2 opt_mode - optimization compression (when it is performed on the fly it is faster than a separate call to optimize()
See also
optimize, bit_or

Definition at line 5906 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::bvector< Alloc >::combine_operation_block_or(), bm::blocks_manager< Alloc >::deinit_tree(), bm::blocks_manager< Alloc >::free_temp_block(), bm::blocks_manager< Alloc >::free_top_subblock(), FULL_BLOCK_FAKE_ADDR, bm::bvector< Alloc >::get_blocks_manager(), i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::opt_none, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by bm::bvector< Alloc >::bit_or_and(), bm::bvector< Alloc >::bit_sub(), DesrializationTest2(), EmptyBVTest(), FreezeTest(), bm::bvector< Alloc >::merge(), bm::operator|(), bm::bvector< >::operator|=(), OrOperationsTest(), SerializationOperation(), StressTest(), and SubOperationsTest().

◆ bit_or_and()

3-operand AND where result is ORed into the terget vector : this |= bv1 AND bv2 TARGET := TARGET OR (BV1 AND BV2)

Parameters
bv1 - Argument vector 1 bv2 - Argument vector 2 opt_mode - optimization compression (when it is performed on the fly it is faster than a separate call to optimize()
See also
optimize, bit_and

Definition at line 6213 of file bm.h.

References bm::bvector< Alloc >::bit_and(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), bm::bvector< Alloc >::combine_operation_block_and(), bm::bvector< Alloc >::combine_operation_block_and_or(), bm::blocks_manager< Alloc >::deallocate_top_subblock(), bm::blocks_manager< Alloc >::free_temp_block(), bm::blocks_manager< Alloc >::free_top_subblock(), FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::bvector< Alloc >::get_blocks_manager(), i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::opt_none, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AndOrOperationsTest().

◆ bit_sub() [1/2]

2 operand logical SUB(AND NOT). Also known as MINUS.

Parameters

Definition at line 1825 of file bm.h.

◆ bit_sub() [2/2]

3-operand SUB : this := bv1 MINUS bv2 SUBtraction is also known as AND NOT

Parameters
bv1 - Argument vector 1 bv2 - Argument vector 2 opt_mode - optimization compression (when it is performed on the fly it is faster than a separate call to optimize()
See also
optimize, bit_sub

Definition at line 6330 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::bvector< Alloc >::combine_operation_block_sub(), bm::blocks_manager< Alloc >::deinit_tree(), bm::blocks_manager< Alloc >::free_temp_block(), bm::blocks_manager< Alloc >::free_top_subblock(), FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::bvector< Alloc >::get_blocks_manager(), i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::opt_none, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by bm::bvector< Alloc >::clear(), bm::operator-(), bm::bvector< >::operator-=(), SerializationOperation(), StressTest(), StressTestAggregatorAND_SUB(), and SubOperationsTest().

◆ bit_xor() [1/2]

2 operand logical XOR

Parameters

Definition at line 1814 of file bm.h.

◆ bit_xor() [2/2]

3-operand XOR : this := bv1 XOR bv2

Parameters
bv1 - Argument vector 1 bv2 - Argument vector 2 opt_mode - optimization compression (when it is performed on the fly it is faster than a separate call to optimize()
See also
optimize, bit_xor

Definition at line 6005 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::bvector< Alloc >::combine_operation_block_xor(), bm::blocks_manager< Alloc >::deallocate_top_subblock(), bm::blocks_manager< Alloc >::deinit_tree(), bm::blocks_manager< Alloc >::free_temp_block(), bm::blocks_manager< Alloc >::free_top_subblock(), FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::bvector< Alloc >::get_blocks_manager(), i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::opt_none, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by CheckRangeDeserial(), bm::operator^(), bm::bvector< >::operator^=(), SerializationOperation(), StressTest(), TestFindDiff(), and XorOperationsTest().

◆ block_count_to()

template<typename Alloc >

Compute rank in bit-block using rank-select index.

Definition at line 2846 of file bm.h.

References bm::bit_block_calc_count_range(), bm::bit_block_calc_count_to(), BM_ASSERT, BM_BORDER_TEST, cnt, bm::bvector< Alloc >::first(), bm::gap_max_bits, bm::get_nibble(), bm::rs3_border0, bm::rs3_border0_1, bm::rs3_border1, and bm::rs3_border1_1.

Referenced by bm::bvector< Alloc >::count_to(), bm::bvector< Alloc >::count_to_test(), and bm::bvector< Alloc >::rank_corrected().

◆ build_rs_index()

template<typename Alloc >

compute running total of all blocks in bit vector (rank-select index)

Parameters
rs_idx - [out] pointer to index / count structure bv_blocks - [out] list of block ids in the vector (internal, optional) Function will fill full array of running totals
See also
count_to, select, find_rank

Definition at line 2501 of file bm.h.

References bm::bit_block_calc_count_range(), bm::bit_block_calc_count_to(), BLOCK_ADDR_SAN, bm::blocks_manager< Alloc >::block_bitcount(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::bvector< Alloc >::clear(), cnt, bm::blocks_manager< Alloc >::find_max_top_blocks(), bm::blocks_manager< Alloc >::find_real_top_blocks(), bm::bvector< Alloc >::find_reverse(), FULL_BLOCK_FAKE_ADDR, bm::gap_bfind(), bm::gap_bit_count_range(), bm::gap_bit_count_to(), bm::gap_max_bits, bm::get_block_coord(), i, bm::bvector< Alloc >::init(), bm::rs_index< BVAlloc >::init(), bm::blocks_manager< Alloc >::is_init(), bm::rs_index< BVAlloc >::register_super_block(), bm::rs_index< BVAlloc >::resize(), bm::rs_index< BVAlloc >::resize_effective_super_blocks(), bm::rs3_border0, bm::rs3_border0_1, bm::rs3_border1, bm::rs3_border1_1, bm::bvector< Alloc >::set_bit_no_check(), bm::set_block_shift, bm::rs_index< BVAlloc >::set_full_super_block(), bm::rs_index< BVAlloc >::set_null_super_block(), bm::bvector< Alloc >::set_range_no_check(), bm::set_sub_array_size, bm::rs_index< BVAlloc >::set_total(), bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AndOperationsTest(), BasicFunctionalityTest(), CountRangeTest(), main(), OrOperationsTest(), RangeRandomFillTest(), RankFindTest(), SimpleRandomFillTest(), StressTest(), SubOperationsTest(), TestRankCompress(), CPhyTreeCalc::x_CalcDivergenceMatrix(), and XorOperationsTest().

◆ calc_stat()

template<typename Alloc >

Calculates bitvector statistics.

Parameters
st - pointer on statistics structure to be filled in.

Function fills statistics structure containing information about how this vector uses memory and estimation of max. amount of memory bvector needs to serialize itself.

See also
statistics

Definition at line 3980 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::calc_serialization_null_full(), bm::find_not_null_ptr(), FULL_BLOCK_FAKE_ADDR, bm::gap_capacity(), bm::gap_length(), bm::gap_level(), bm::gap_levels, bm::blocks_manager< Alloc >::glen(), i, bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, len, bm::set_block_size, bm::set_sub_array_size, st(), bm::blocks_manager< Alloc >::temp_block_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), BasicFunctionalityTest(), BlockLevelTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorInsertTest(), BvectorShiftTest(), BVImportTest(), DesrializationTest2(), EmptyBVTest(), FreezeTest(), GenericBVectorTest(), LoadBVDump(), LoadVectors(), MutationOperationsTest(), bm::bvector< Alloc >::optimize(), bm::bvector< Alloc >::optimize_gap_size(), OptimizeTest(), OrOperationsTest(), bm::print_bvector_stat(), RankFindTest(), ResizeTest(), s_GetMD5Tag(), bm::SaveBVector(), SerializationCompressionLevelsTest(), SerializationOperation(), SerializationTest(), CBVector_data::SetBitVector(), SetTest(), CJobStatusTracker::StatusStatistics(), StressTest(), SubOperationsTest(), CObjectOStreamAsn::WriteBitString(), CObjectOStreamAsnBinary::WriteBitString(), CObjectOStreamJson::WriteBitString(), CObjectOStreamXml::WriteBitString(), CSparseGraph::x_WriteMap(), and XorOperationsTest().

◆ check_or_next()

Definition at line 5324 of file bm.h.

References bm::bit_block_find(), bm::bit_find_first(), bm::bits_in_array, bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::gap_block_find(), bm::gap_find_first(), bm::gap_max_bits, bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), bm::blocks_manager< Alloc >::get_topblock(), i, bm::blocks_manager< Alloc >::is_init(), prev(), bm::set_block_mask, bm::set_block_shift, bm::set_sub_array_size, and bm::blocks_manager< Alloc >::top_block_size().

Referenced by bm::bvector< Alloc >::check_or_next_extract(), bm::bvector< Alloc >::find(), bm::bvector< >::get_first(), and bm::bvector< >::get_next().

◆ check_or_next_extract() ◆ clear() [1/2] ◆ clear() [2/2]

clear list of bits in this bitset

This is equivalent of AND NOT (Set Substract), argument set as an array.

Parameters
ids - pointer on array of indexes to set ids_size - size of the input (ids) so - sort order (use BM_SORTED for faster load)
See also
set, keep

Definition at line 4149 of file bm.h.

References bm::bvector< Alloc >::bit_sub(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::bvector< Alloc >::find_reverse(), bm::bvector< Alloc >::import(), bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), last(), and bm::bvector< Alloc >::resize().

Referenced by AggregatorTest(), AndOperationsTest(), BasicFunctionalityTest(), bm::bvector< Alloc >::build_rs_index(), BvectorBitForEachTest(), BvectorBulkSetTest(), CQueue::CancelSelectedJobs(), CNSAffinityRegistry::Clear(), CNSGroupsRegistry::Clear(), CNSScopeRegistry::Clear(), CJobStatusTracker::ClearAll(), ClearAllTest(), SRemoteNodeData::ClearJobs(), SRemoteNodeData::ClearPreferredAffinities(), SRemoteNodeData::ClearWaitAffinities(), bm::bvector< Alloc >::combine_operation_and(), ComparisonTest(), bm::bvector< Alloc >::copy_range(), DesrializationTest2(), EmptyBVTest(), FreezeTest(), GAPCheck(), CQueue::GetJobsPerState(), CBDB_Cache::GetNextBlobId(), GroupByTest(), IntervalEnumeratorTest(), Intervals_RangesTest(), IsAllOneRangeTest(), bm::bvector< Alloc >::keep(), MaxSTest(), OrOperationsTest(), CNSAffinityRegistry::Print(), CNSGroupsRegistry::Print(), CQueue::PrintAllJobDbStat(), CNSClientsRegistry::PrintClientsList(), RangeForEachTest(), CObjectIStreamAsn::ReadBitString(), CObjectIStreamAsnBinary::ReadBitString(), CObjectIStreamJson::ReadBitString(), CObjectIStreamXml::ReadBitString(), bm::bvector< >::reset(), SerializationOperation2Test(), CNetScheduleAccessList::SetHosts(), SetTest(), StressTest(), SubOperationsTest(), TestSignedSparseVectorScan(), TestSparseVectorScan(), TestSparseVectorTransform(), CNSClientsRegistry::x_BuildAffinities(), CSparseGraph::x_CheckRemoteData(), SRemoteNodeData::x_ClearPreferredAffinities(), CQueue::x_ClearQueue(), CSparseGraph::x_ReadMap(), and XorOperationsTest().

◆ clear_bit() ◆ clear_bit_no_check()

Clears bit n without precondiion checks.

Parameters
n - bit's index to be cleaned.

Definition at line 4680 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set_no_ret(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::id_max, bm::bvector< Alloc >::is_ro(), n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and val.

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

◆ clear_range()

Sets all bits to zero in the specified closed interval [left,right] Interval must be inside the bvector's size. This method DOES NOT resize vector.

Parameters
left - interval start right - interval end (closed interval)
See also
set_range

Definition at line 1216 of file bm.h.

Referenced by TestSparseVector().

◆ clear_range_no_check()

Clear range without validity/bounds checking.

Definition at line 7909 of file bm.h.

References bm::bits_in_block, bm::bvector< Alloc >::blockman_, bm::BM_AND, BM_ASSERT, BM_IS_GAP, bm::bvector< Alloc >::combine_operation_with_block(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, r(), bm::blocks_manager< Alloc >::set_all_zero(), bm::set_block_mask, and bm::set_block_shift.

Referenced by bm::bvector< Alloc >::copy_range_no_check(), bm::bvector< Alloc >::invert(), bm::bvector< Alloc >::keep_range_no_check(), and bm::bvector< Alloc >::set_range().

◆ combine_operation()

perform a set-algebra operation by operation code

Definition at line 6750 of file bm.h.

References bm::bvector< Alloc >::blockman_, bm::BM_AND, BM_IS_GAP, bm::BM_SUB, bm::bvector< Alloc >::combine_operation_with_block(), bm::blocks_manager< Alloc >::get_block(), bm::blocks_manager< Alloc >::get_topblock(), i, bm::blocks_manager< Alloc >::init_tree(), bm::blocks_manager< Alloc >::is_init(), r(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::bvector< Alloc >::set_range(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), bm::blocks_manager< Alloc >::top_blocks_root(), and bm::blocks_manager< Alloc >::zero_block().

◆ combine_operation_and()

perform a set-algebra operation AND

Definition at line 6598 of file bm.h.

References bm::avx2_test_all_zero_wave(), bm::bvector< Alloc >::blockman_, BM_AND_OP, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), bm::bvector< Alloc >::clear(), bm::blocks_manager< Alloc >::deallocate_top_subblock(), FULL_BLOCK_FAKE_ADDR, i, bm::blocks_manager< Alloc >::is_init(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::sse42_test_all_zero_wave(), bm::blocks_manager< Alloc >::top_block_size(), bm::blocks_manager< Alloc >::top_blocks_root(), and bm::blocks_manager< Alloc >::zero_block().

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

◆ combine_operation_block_and() [1/2]

Definition at line 7471 of file bm.h.

References bm::blocks_manager< Alloc >::assign_gap_check(), bm::bit_block_and(), bm::bit_block_copy(), bm::bit_is_all_zero(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, BMSET_PTRGAP, bm::calc_block_digest0(), bm::blocks_manager< Alloc >::clone_gap_block(), bm::bvector< Alloc >::empty(), bm::gap_and_to_bitset(), bm::gap_equiv_len, bm::gap_is_all_zero(), bm::gap_operation_and(), bm::blocks_manager< Alloc >::get_allocator(), bm::blocks_manager< Alloc >::glen(), i, IS_FULL_BLOCK, bm::blocks_manager< Alloc >::set_block_ptr(), bm::word_bitcount64(), and bm::blocks_manager< Alloc >::zero_block().

◆ combine_operation_block_and() [2/2]

Definition at line 7027 of file bm.h.

References bm::bit_block_and_2way(), bm::bit_is_all_zero(), bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::borrow_tempblock(), bm::blocks_manager< Alloc >::clone_assign_block(), bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_and_to_bitset(), bm::gap_equiv_len, bm::gap_operation_and(), i, bm::blocks_manager< Alloc >::return_tempblock(), and bm::blocks_manager< Alloc >::set_block_ptr().

Referenced by bm::bvector< Alloc >::bit_and(), and bm::bvector< Alloc >::bit_or_and().

◆ combine_operation_block_and_or()

Definition at line 7112 of file bm.h.

References bm::bit_block_and_or_2way(), bm::bit_block_copy(), bm::bit_block_or(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_tempblock(), bm::bvector< Alloc >::combine_operation_block_or(), bm::blocks_manager< Alloc >::deoptimize_block_no_check(), FULL_BLOCK_FAKE_ADDR, bm::gap_add_to_bitset(), bm::gap_and_to_bitset(), bm::gap_equiv_len, bm::gap_operation_and(), bm::blocks_manager< Alloc >::get_block_ptr(), i, bm::is_bits_one(), bm::blocks_manager< Alloc >::return_tempblock(), bm::blocks_manager< Alloc >::set_block_ptr(), and bm::blocks_manager< Alloc >::zero_block().

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

◆ combine_operation_block_or() [1/2]

Definition at line 7286 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_, bm::blocks_manager< Alloc >::assign_gap_check(), bm::bit_block_copy(), bm::bit_block_or(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_add_to_bitset(), bm::gap_equiv_len, bm::gap_operation_or(), bm::blocks_manager< Alloc >::get_allocator(), bm::blocks_manager< Alloc >::glen(), i, bm::is_bits_one(), IS_FULL_BLOCK, bm::blocks_manager< Alloc >::set_block(), bm::blocks_manager< Alloc >::set_block_ptr(), and bm::blocks_manager< Alloc >::zero_block().

◆ combine_operation_block_or() [2/2]
Returns
true if block optimization may be needed

Definition at line 6872 of file bm.h.

References bm::bit_block_or_2way(), bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::borrow_tempblock(), bm::blocks_manager< Alloc >::clone_assign_block(), bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_add_to_bitset(), bm::gap_equiv_len, bm::gap_operation_or(), i, bm::blocks_manager< Alloc >::return_tempblock(), and bm::blocks_manager< Alloc >::set_block_ptr().

Referenced by bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::combine_operation_block_and_or(), and bm::bvector< Alloc >::merge().

◆ combine_operation_block_sub() [1/2]

Definition at line 7577 of file bm.h.

References bm::blocks_manager< Alloc >::assign_gap_check(), bm::bit_andnot_arr_ffmask(), bm::bit_is_all_zero(), bm::bit_operation_sub(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_tempblock(), bm::blocks_manager< Alloc >::convert_gap2bitset(), bm::bvector< Alloc >::empty(), bm::gap_convert_to_bitset_smart(), bm::gap_equiv_len, bm::gap_max_bits, bm::gap_operation_sub(), bm::gap_sub_to_bitset(), bm::blocks_manager< Alloc >::get_allocator(), i, IS_FULL_BLOCK, IS_VALID_ADDR, bm::blocks_manager< Alloc >::set_block_ptr(), and bm::blocks_manager< Alloc >::zero_block().

◆ combine_operation_block_sub() [2/2]

Definition at line 7212 of file bm.h.

References bm::bit_block_sub(), bm::bit_block_sub_2way(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::borrow_tempblock(), bm::blocks_manager< Alloc >::clone_assign_block(), bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, bm::gap_convert_to_bitset(), bm::gap_equiv_len, bm::gap_operation_sub(), bm::gap_sub_to_bitset(), i, bm::blocks_manager< Alloc >::return_tempblock(), and bm::blocks_manager< Alloc >::set_block_ptr().

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

◆ combine_operation_block_xor() [1/2]

Definition at line 7366 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_, bm::blocks_manager< Alloc >::assign_gap_check(), bm::bit_block_copy(), bm::bit_block_set(), bm::bit_block_xor(), bm::bit_invert(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_equiv_len, bm::gap_invert(), bm::gap_operation_xor(), bm::gap_xor_to_bitset(), bm::blocks_manager< Alloc >::get_allocator(), bm::blocks_manager< Alloc >::glen(), i, IS_FULL_BLOCK, bm::blocks_manager< Alloc >::set_block(), and bm::blocks_manager< Alloc >::set_block_ptr().

◆ combine_operation_block_xor() [2/2]

Definition at line 6945 of file bm.h.

References bm::bit_block_xor_2way(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::borrow_tempblock(), bm::blocks_manager< Alloc >::clone_assign_block(), bm::blocks_manager< Alloc >::clone_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_equiv_len, bm::gap_operation_xor(), bm::gap_xor_to_bitset(), i, IS_FULL_BLOCK, bm::blocks_manager< Alloc >::return_tempblock(), and bm::blocks_manager< Alloc >::set_block_ptr().

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

◆ combine_operation_or()

perform a set-algebra operation OR

Definition at line 6427 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::avx2_test_all_eq_wave2(), bm::bvector< Alloc >::blockman_, BM_OR_OP, bm::blocks_manager< Alloc >::deallocate_top_subblock(), FULL_BLOCK_FAKE_ADDR, i, bm::blocks_manager< Alloc >::is_init(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::sse42_test_all_eq_wave2(), bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

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

◆ combine_operation_sub()

perform a set-algebra operation MINUS (AND NOT)

Definition at line 6686 of file bm.h.

References bm::avx2_test_all_zero_wave(), bm::bvector< Alloc >::blockman_, BM_SUB_OP, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), bm::blocks_manager< Alloc >::deallocate_top_subblock(), FULL_BLOCK_FAKE_ADDR, i, bm::blocks_manager< Alloc >::is_init(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::sse42_test_all_zero_wave(), bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

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

◆ combine_operation_with_block() [1/2]

Definition at line 7658 of file bm.h.

References bm::all_bits_mask, bm::blocks_manager< Alloc >::assign_gap(), bm::bit_andnot_arr_ffmask(), bm::bit_block_copy(), bm::bit_operation_and(), bm::bit_operation_or(), bm::bit_operation_sub(), bm::bit_operation_xor(), bm::bvector< Alloc >::blockman_, bm::BM_AND, BM_ASSERT, bm::BM_OR, bm::BM_SUB, bm::BM_XOR, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_tempblock(), bm::blocks_manager< Alloc >::clone_gap_block(), bm::blocks_manager< Alloc >::convert_gap2bitset(), copy_block(), bm::gap_convert_to_bitset_smart(), bm::gap_equiv_len, bm::gap_is_all_zero(), bm::gap_max_bits, bm::operation_functions< T >::gap_op_to_bit(), bm::operation_functions< T >::gap_operation(), bm::blocks_manager< Alloc >::get_allocator(), IS_FULL_BLOCK, IS_VALID_ADDR, bm::blocks_manager< Alloc >::set_block(), bm::set_block_size, VECT_XOR_ARR_2_MASK, and bm::blocks_manager< Alloc >::zero_block().

◆ combine_operation_with_block() [2/2] ◆ combine_operation_xor()

perform a set-algebra operation XOR

Definition at line 6499 of file bm.h.

References bm::blocks_manager< Alloc >::alloc_top_subblock(), bm::avx2_test_all_zero_wave2(), bm::bvector< Alloc >::blockman_, BM_XOR_OP, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, i, bm::blocks_manager< Alloc >::is_init(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::sse42_test_all_zero_wave2(), bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

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

◆ compare()

template<typename Alloc >

Lexicographical comparison with a bitvector.

Function compares current bitvector with the provided argument bit by bit and returns -1 if this bitvector less than the argument, 1 - greater, 0 - equal

Returns
0 if this == arg, -1 if this < arg, 1 if this > arg
See also
find_first_mismatch

Definition at line 3746 of file bm.h.

References bm::bit_is_all_zero(), bm::bitcmp(), bm::bvector< Alloc >::blockman_, BM_DECLARE_TEMP_BLOCK, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, bm::gap_convert_to_bitset(), bm::gap_is_all_zero(), bm::gapcmp(), bm::blocks_manager< Alloc >::get_topblock(), i, bm::set_block_size_op, bm::set_sub_array_size, and bm::blocks_manager< Alloc >::top_block_size().

Referenced by AggregatorTest(), AndOperationsTest(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorInsertTest(), BvectorShiftTest(), CheckRangeCopy(), ComparisonTest(), DesrializationTest2(), EmptyBVTest(), GenericBVectorTest(), bm::bvector< >::operator<(), bm::bvector< >::operator<=(), bm::bvector< >::operator>(), bm::bvector< >::operator>=(), OrOperationsTest(), RangeForEachTest(), ResizeTest(), SerializationCompressionLevelsTest(), SerializationOperation(), StressTest(), StressTestAggregatorAND(), StressTestAggregatorOR(), StressTestAggregatorShiftAND(), SubOperationsTest(), SyntaxTest(), TestRandomSubset(), TestRankCompress(), TestSignedSparseVectorScan(), TestSparseVectorScan(), TestSparseVectorTransform(), and XorOperationsTest().

◆ copy()

template<typename Alloc >

Copy bvector from the argument bvector.

Parameters
bvect - bit-vector to copy from is_final - BM_READONLY - copies as immutable, BM_READWRITE - copies as mutable even if the argument bvect is read-only vector, BM_UNDEFINED - follow the argument type as is

Definition at line 2303 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::blocks_manager< Alloc >::copy(), bm::blocks_manager< Alloc >::copy_to_arena(), bm::blocks_manager< Alloc >::deinit_tree(), bm::bvector< Alloc >::is_ro(), bm::READONLY, bm::READWRITE, bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::size(), bm::bvector< Alloc >::size_, and bm::UNDEFINED.

Referenced by bm::bvector< >::operator=().

◆ copy_range()

Copy all bits in the specified closed interval [left,right].

Parameters
bvect - source bit-vector left - interval start right - interval end (closed interval)

Definition at line 7986 of file bm.h.

References bm::bvector< Alloc >::blockman_, bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::copy_range_no_check(), bm::blocks_manager< Alloc >::deinit_tree(), bm::blocks_manager< Alloc >::is_init(), and bm::xor_swap().

Referenced by BvectorBitForEachTest(), BVectorErase(), BVectorInsert(), CheckRangeDeserial(), IntervalEnumeratorTest(), IntervalsEnumeratorCheck(), SerializationOperation(), and VisitorAllRangeTest().

◆ copy_range_no_check()

Definition at line 8031 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, bm::bvector< Alloc >::clear_range_no_check(), bm::blocks_manager< Alloc >::copy(), bm::bvector< Alloc >::find_reverse(), bm::gap_max_bits, bm::id_max, last(), and bm::set_block_shift.

Referenced by bm::bvector< >::bvector(), and bm::bvector< Alloc >::copy_range().

◆ count()

template<typename Alloc >

population count (count of ON bits)

See also
count_range
Returns
Total number of bits ON

Definition at line 2401 of file bm.h.

References bm::blocks_manager< Alloc >::block_bitcount(), bm::bvector< Alloc >::blockman_, BM_ASSERT, cnt, bm::find_not_null_ptr(), FULL_BLOCK_FAKE_ADDR, bm::gap_max_bits, i, bm::blocks_manager< Alloc >::is_init(), bm::set_sub_array_size, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), BasicFunctionalityTest(), BlockDigestTest(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorIncTest(), BvectorInsertTest(), BvectorShiftTest(), BVImportTest(), CQueue::ChangeAffinity(), CheckRangeDeserial(), CheckVectors(), ClearAllTest(), CompareStrSparseVector(), CountRangeTest(), DesrializationTest2(), EmptyBVTest(), CBDB_Cache::EvaluateTimeLine(), ExportTest(), FreezeTest(), GAPSerializationTest0(), CQueue::GetGCBacklogCount(), CQueue::GetJobsPerState(), CQueue::GetJobsToDeleteCount(), CTaxIDSetLabelHandler::GetLabel(), GroupByTest(), CNetScheduleAccessList::IsAllowed(), bm::bvector< Alloc >::keep_range_no_check(), KeepRangeTest(), OrOperationsTest(), CNSAffinityRegistry::Print(), CNSGroupsRegistry::Print(), CNSClient::Print(), print_bv(), bm::print_bvector_stat(), CNSClientsRegistry::PrintClientsList(), CBDB_Cache::Purge(), RangeForEachTest(), RankRangeSplitTest(), bm::bvector< >::recalc_count(), ResizeTest(), SerializationCompressionLevelsTest(), SerializationOperation(), SerializationOperation2Test(), SetTest(), SparseSerializationTest(), StressTest(), StressTestAggregatorAND_SUB(), StressTestAggregatorShiftAND(), StressTestStrSparseVector(), SubOperationsTest(), SwapTest(), SyntaxTest(), TestBasicBMatrixVectorSerial(), TestCompressedSparseVectorScan(), TestCompressedSparseVectorScanGT(), TestCompressSparseVector(), TestRandomSubset(), TestRankCompress(), TestSignedSparseVectorScan(), TestSignedSparseVectorScanGT(), TestSignedSparseVectorSerial(), TestSparseFindEqStrPipeline(), TestSparseVector(), TestSparseVectorAlgo(), TestSparseVectorScan(), TestSparseVectorScanGT(), TestSparseVectorSerial(), TestSparseVectorTransform(), CPhyTreeCalc::x_CalcDivergenceMatrix(), CQueue::x_DumpJobs(), CQueue::x_Erase(), CNSGroupsRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintOne(), CNSAffinityRegistry::x_PrintOne(), CNSClientsRegistry::x_PrintSelected(), CNSAffinityRegistry::x_PrintSelected(), CNSGroupsRegistry::x_PrintSelected(), and XorOperationsTest().

◆ count_blocks()

template<typename Alloc >

◆ count_range() [1/2]

template<typename Alloc >

◆ count_range() [2/2]

template<typename Alloc >

Returns count of 1 bits in the given range [left..right] Uses rank-select index to accelerate the search.

Parameters
left - index of first bit start counting from right - index of last bit rs_idx - block count structure to accelerate search
See also
build_rs_index
Returns
population count in the diapason

Definition at line 3518 of file bm.h.

References BM_ASSERT_THROW, bm::bvector< Alloc >::count_range_no_check(), bm::id_max, and bm::xor_swap().

Referenced by BvectorEraseTest(), CheckRangeDeserial(), EmptyBVTest(), CSeqTable_sparse_index::GetIndexAt(), CSparseGraph::GetMissingRegions(), CPileUpGraph::GetNumberOfReads(), IsAllOneRangeTest(), bm::bvector< Alloc >::keep_range_no_check(), KeepRangeTest(), main(), RankRangeSplitTest(), TestCompressSparseVector(), verify_all_one_ranges(), VerifyCountRange(), and CPhyTreeCalc::x_CalcDivergenceMatrix().

◆ count_range_no_check() [1/2]

template<typename Alloc >

Returns count of 1 bits in the given range [left..right] Function expects that caller guarantees that left < right

See also
count_range

Definition at line 3260 of file bm.h.

References bm::bit_block_calc_count_range(), bm::bits_in_block, bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, cnt, bm::blocks_manager< Alloc >::block_count_func::count(), bm::for_each_nzblock_range(), bm::gap_bit_count_range(), bm::gap_bit_count_to(), bm::blocks_manager< Alloc >::get_block(), bm::get_block_coord(), r(), bm::blocks_manager< Alloc >::block_count_func::reset(), bm::set_block_mask, bm::set_block_shift, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

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

◆ count_range_no_check() [2/2]

template<typename Alloc >

◆ count_to()

template<typename Alloc >

Returns count of 1 bits (population) in [0..right] range.

This operation is also known as rank of bit N.

Parameters
n - index of bit to rank rs_idx - rank-select to accelerate search should be prepared using build_rs_index
Returns
population count in the range [0..n]
See also
build_rs_index
count_to_test, select, rank, rank_corrected

Definition at line 3090 of file bm.h.

References bm::bvector< Alloc >::block_count_to(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, cnt, FULL_BLOCK_FAKE_ADDR, bm::bvector< Alloc >::gap_count_to(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, and bm::set_block_shift.

Referenced by bm::bvector< Alloc >::count_range_no_check(), bm::bvector< >::rank(), and VerifyCountRange().

◆ count_to_test()

template<typename Alloc >

popcount in [0..right] range if test(right) == true

This is conditional rank operation, which is faster than test() plus count_to()

Parameters
n - index of bit to test and rank rs_idx - rank-select index (block count structure to accelerate search) should be prepared using build_rs_index()
Returns
population count in the diapason or 0 if right bit test failed
See also
build_rs_index
count_to

Definition at line 3143 of file bm.h.

References bm::bit_block_calc_count_to(), bm::bvector< Alloc >::block_count_to(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, cnt, FULL_BLOCK_FAKE_ADDR, bm::gap_bit_count_to(), bm::bvector< Alloc >::gap_count_to(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, and bm::set_word_shift.

Referenced by VerifyCountRange().

◆ empty() ◆ end()

Returns enumerator pointing on the next bit after the last.

Definition at line 1877 of file bm.h.

Referenced by bit_convert_to_gap(), BvectorBitForEachTest(), BvectorBulkSetTest(), EnumeratorTest(), GAPCheck(), CTaxIDSetLabelHandler::GetLabel(), interval_copy_range(), RangeForEachTest(), SerializationOperation(), TestBlockDigest(), CObjectOStreamAsn::WriteBitString(), CObjectOStreamAsnBinary::WriteBitString(), CObjectOStreamJson::WriteBitString(), and CObjectOStreamXml::WriteBitString().

◆ equal()

Equal comparison with an agr bit-vector.

Returns
true if vectors are identical

Definition at line 2017 of file bm.h.

Referenced by AggregatorTest(), BvectorBitForEachTest(), BvectorShiftTest(), BVImportTest(), Check_V3DR_Serializations(), CheckGTSearch(), CheckRangeDeserial(), FreezeTest(), GAPTestStress(), IntervalEnumeratorTest(), IntervalsEnumeratorCheck(), KleeneLogicTest(), bm::bvector< >::operator!=(), bm::bvector< >::operator==(), RangeForEachTest(), SerializationCompressionLevelsTest(), SerializationOperation(), SerializationOperation2Test(), SetTest(), SparseSerializationTest(), StressTestAggregatorAND(), StressTestAggregatorAND_SUB(), StressTestStrSparseVector(), TestSignedSparseVectorScanGT(), TestSparseFindEqStrPipeline(), TestSparseVectorAlgo(), TestSparseVectorScan(), TestSparseVectorScanGT(), TestStrSparseVector(), and VisitorAllRangeTest().

◆ erase()

Erase bit in the specified position All the vector content after erase position is shifted left.

Parameters
n - index of the bit to insert

Definition at line 5646 of file bm.h.

References bm::bit_block_erase(), bm::bit_block_shift_l1_unr(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, bm::BM_BIT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), bm::blocks_manager< Alloc >::check_allocate_block(), bm::blocks_manager< Alloc >::deoptimize_block(), bm::blocks_manager< Alloc >::extend_gap_block(), bm::find_not_null_ptr(), FULL_BLOCK_FAKE_ADDR, bm::gap_is_all_zero(), bm::gap_limit(), bm::gap_max_bits, bm::gap_shift_l1(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), bm::blocks_manager< Alloc >::glen(), i, bm::id_max, IS_FULL_BLOCK, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, n, bm::bvector< Alloc >::set_bit_no_check(), bm::set_block_mask, bm::set_block_shift, bm::set_block_size, bm::set_sub_array_size, bm::set_top_array_size, bm::bvector< Alloc >::test(), bm::bvector< Alloc >::test_first_block_bit(), bm::blocks_manager< Alloc >::top_block_size(), bm::blocks_manager< Alloc >::top_blocks_root(), and bm::blocks_manager< Alloc >::zero_block().

Referenced by BvectorEraseTest(), and bm::bvector< Alloc >::shift_left().

◆ extract_next()

Finds the number of the next bit ON and sets it to 0.

Parameters
prev - Index of the previously found bit.
Returns
Index of the next bit which is ON or 0 if not found.
See also
get_first, get_next, find_reverse

Definition at line 1619 of file bm.h.

Referenced by EmptyBVTest().

◆ fill_alloc_digest()

template<typename Alloc >

◆ find() [1/2]

Finds index of first 1 bit.

Parameters
pos - [out] index of the found 1 bit
Returns
true if search returned result
See also
get_first, get_next, extract_next, find_reverse, find_first_mismatch

Definition at line 5093 of file bm.h.

References bm::bit_find_first(), bm::bits_in_array, bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::gap_find_first(), bm::gap_max_bits, bm::blocks_manager< Alloc >::get_topblock(), i, bm::set_sub_array_size, and bm::blocks_manager< Alloc >::top_block_size().

Referenced by BvectorEraseTest(), CompareStrSparseVector(), EnumeratorTest(), bm::bvector< Alloc >::find(), bm::bvector< Alloc >::find_first_mismatch(), bm::bvector< Alloc >::find_range(), FreezeTest(), GetNextTest(), StressTestStrSparseVector(), and TestFindDiff().

◆ find() [2/2] ◆ find_first_mismatch()

template<typename Alloc >

Find index of first bit different between this and the agr vector.

Parameters
bvect - argumnet vector to compare with pos - [out] position of the first difference search_to - search limiter [0..to] to avoid overscan (default: unlimited to the vectors end)
Returns
true if didfference found, false - both vectors are equivalent
See also
compare

Definition at line 3864 of file bm.h.

References BLOCK_ADDR_SAN, bm::block_find_first_diff(), bm::bvector< Alloc >::blockman_, f, bm::bvector< Alloc >::find(), FULL_BLOCK_FAKE_ADDR, FULL_BLOCK_REAL_ADDR, bm::gap_max_bits, bm::get_block_coord(), bm::blocks_manager< Alloc >::get_topblock(), i, bm::set_block_shift, bm::set_sub_array_size, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AndOperationsTest(), bm::bvector< >::equal(), OrOperationsTest(), StressTest(), SubOperationsTest(), and XorOperationsTest().

◆ find_range()

Finds dynamic range of bit-vector [first, last].

Parameters
first - index of the first found 1 bit last - index of the last found 1 bit
Returns
true if search returned result
See also
get_first, get_next, extract_next, find, find_reverse

Definition at line 5139 of file bm.h.

References BM_ASSERT, bm::bvector< Alloc >::find(), and bm::bvector< Alloc >::find_reverse().

Referenced by CheckRangeCopy(), GetNextTest(), RankRangeSplitTest(), SerializationOperation(), TestCompressSparseSignedVector(), TestCompressSparseVector(), TestSignedSparseVectorScan(), and TestSparseVectorScan().

◆ find_rank() [1/2]

Find bit-vector position for the specified rank(bitcount)

Rank based search, counts number of 1s from specified position until finds the ranked position relative to start from position. In other words: range population count between from and pos == rank.

Parameters
rank - rank to find (bitcount) from - start positioon for rank search pos - position with speciefied rank (relative to from position)
Returns
true if requested rank was found

Definition at line 5159 of file bm.h.

References bm::blocks_manager< Alloc >::block_bitcount(), bm::block_find_rank(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, cnt, bm::gap_max_bits, bm::blocks_manager< Alloc >::get_block(), bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_block_size, and bm::set_total_blocks.

Referenced by BasicFunctionalityTest(), and RankFindTest().

◆ find_rank() [2/2]

Find bit-vector position for the specified rank(bitcount)

Rank based search, counts number of 1s from specified position until finds the ranked position relative to start from position. In other words: range population count between from and pos == rank.

Parameters
rank - rank to find (bitcount) from - start positioon for rank search pos - position with speciefied rank (relative to from position) rs_idx - rank-select index to accelarate search (should be prepared using build_rs_index)
See also
build_rs_index, select
Returns
true if requested rank was found

Definition at line 5212 of file bm.h.

References bm::block_find_rank(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, bm::blocks_manager< Alloc >::get_block(), bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, and bm::set_block_size.

◆ find_reverse() [1/2]

Finds last index of 1 bit.

Parameters
pos - [out] index of the last found 1 bit
Returns
true if search returned result
See also
get_first, get_next, extract_next,
find, find_first_mismatch, find_range

Definition at line 4911 of file bm.h.

References bm::bit_find_last(), bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::gap_find_last(), bm::gap_max_bits, bm::blocks_manager< Alloc >::get_topblock(), i, bm::set_sub_array_size, and bm::blocks_manager< Alloc >::top_block_size().

Referenced by bm::bvector< Alloc >::build_rs_index(), BvectorFindReverseTest(), CheckVectors(), bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::copy_range_no_check(), bm::bvector< Alloc >::find_range(), GetNextTest(), bm::bvector< Alloc >::keep(), bm::bvector< Alloc >::keep_range_no_check(), and bm::bvector< Alloc >::sync_size().

◆ find_reverse() [2/2]

Reverse finds next(prev) index of 1 bit.

Parameters
from - index to search from pos - [out] found position index (undefined if method returns false)
Returns
true if search returned result
See also
get_first, get_next, extract_next,
find, find_first_mismatch, find_range

Definition at line 4968 of file bm.h.

References bm::bit_find_last(), bm::block_find_reverse(), bm::bvector< Alloc >::blockman_, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, FULL_SUB_BLOCK_REAL_ADDR, bm::gap_find_last(), bm::gap_max_bits, bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), bm::blocks_manager< Alloc >::get_topblock(), i, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_sub_array_size, and bm::bvector< Alloc >::test().

◆ first()

Returns enumerator pointing on the first non-zero bit.

Definition at line 1871 of file bm.h.

Referenced by CNSAffinityRegistry::AddClientToAffinities(), bm::bvector< Alloc >::block_count_to(), BVectorErase(), BVectorInsert(), BVImportTest(), CQueue::CheckExecutionTimeout(), CheckIntervals(), CQueue::CheckJobsExpiry(), CNSAffinityRegistry::CheckRemoveCandidates(), CNSGroupsRegistry::CheckRemoveCandidates(), CheckVectors(), CNSAffinityRegistry::CollectGarbage(), CNSGroupsRegistry::CollectGarbage(), CQueue::DeleteBatch(), DetailedCheckVectors(), CQueue::Dump(), CNSAffinityRegistry::Dump(), CNSGroupsRegistry::Dump(), EmptyBVTest(), EnumeratorTest(), CBDB_Cache::EvaluateTimeLine(), FindLastBit(), bm::bvector< Alloc >::gap_count_to(), CJobStatusTracker::GetJobByStatus(), CNSGroupsRegistry::GetJobs(), CNSAffinityRegistry::GetJobsWithAffinities(), CTaxIDSetLabelHandler::GetLabel(), CJobStatusTracker::GetOutdatedPendingJobs(), CJobStatusTracker::GetOutdatedReadVacantJobs(), main(), SNSNotificationAttributes::Print(), CNSAffinityRegistry::Print(), CNSGroupsRegistry::Print(), CNSClient::Print(), CNetScheduleAccessList::Print(), print_bv(), CNSClientsRegistry::PrintClientsList(), RangeDeserializationTest(), ResizeTest(), CNSGroupsRegistry::RestrictByGroup(), bm::bvector< Alloc >::enumerator::search_in_gapblock(), CNSAffinityRegistry::SetWaitClientForAffinities(), ShiftRight(), TestSparseVectorTransform(), CObjectOStreamAsn::WriteBitString(), CObjectOStreamAsnBinary::WriteBitString(), CObjectOStreamJson::WriteBitString(), CObjectOStreamXml::WriteBitString(), CPhyTreeCalc::x_CalcDivergenceMatrix(), CQueue::x_CancelJobs(), CQueue::x_DumpJobs(), CQueue::x_FindOutdatedJobForReading(), CQueue::x_FindOutdatedPendingJob(), CQueue::x_FindVacantJob(), CQueue::x_GetRunningJobsPerClientIP(), CNSGroupsRegistry::x_PrintOne(), CNSScopeRegistry::x_PrintOne(), CNSAffinityRegistry::x_PrintOne(), CNSAffinityRegistry::x_RemoveClientFromAffinities(), CQueue::x_ResetReadingDueToClear(), CQueue::x_ResetReadingDueToNewSession(), CQueue::x_ResetRunningDueToClear(), and CQueue::x_ResetRunningDueToNewSession().

◆ flip() [1/2]

Flips all bits.

Returns
*this
See also
invert

Definition at line 1280 of file bm.h.

◆ flip() [2/2] ◆ forget_count()

Disables count cache. (deprecated).

Definition at line 1482 of file bm.h.

◆ freeze() ◆ gap_block_set() ◆ gap_block_set_no_ret() ◆ gap_count_to()

template<typename Alloc >

Compute rank in GAP block using rank-select index.

Parameters
test_set - request to test nbit_right before computing count (returns 0 if not set)

Definition at line 2954 of file bm.h.

References BM_ASSERT, cnt, bm::bvector< Alloc >::first(), bm::gap_bit_count_range(), bm::gap_bit_count_range_hint(), bm::gap_bit_count_to(), bm::gap_max_bits, bm::gap_test_unr(), bm::rs3_border0, bm::rs3_border1, and bm::rs3_half_span.

Referenced by bm::bvector< Alloc >::count_to(), and bm::bvector< Alloc >::count_to_test().

◆ get_allocator() ◆ get_allocator_pool()

Get curent allocator pool (if set)

Returns
pointer to the current pool or NULL

Definition at line 1045 of file bm.h.

◆ get_bit()

template<typename Alloc >

returns true if bit n is set and false is bit n is 0.

Parameters
n - Index of the bit to check.
Returns
Bit value (1 or 0)

Definition at line 3604 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_FAKE_ADDR, bm::gap_test_unr(), bm::get_block_coord(), i, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size_, and bm::blocks_manager< Alloc >::top_blocks_.

Referenced by SRemoteNodeData::AddPreferredAffinity(), BasicFunctionalityTest(), CQueue::Cancel(), CQueue::ChangeAffinity(), CheckVectors(), DetailedCheckVectors(), CQueue::FailJob(), GAPCheck(), CSeqTable_sparse_index::GetIndexAt(), CJobStatusTracker::GetJobByStatus(), CJobStatusTracker::GetStatus(), CSeqTable_sparse_index::HasValueAt(), CNSClientsRegistry::IsPreferredByAny(), SRemoteNodeData::MoveJobToBlacklist(), bm::bvector< >::operator[](), CQueue::PrintJobDbStat(), CQueue::PutResult(), CQueue::RereadJob(), CQueue::SetAffinity(), CJobStatusTracker::SetStatus(), bm::bvector< >::test(), SRemoteNodeData::UpdateBlacklist(), CQueue::x_CancelJobs(), CQueue::x_CheckExecutionTimeout(), CQueue::x_FindVacantJob(), CNSClientsRegistry::x_PrintSelected(), CNSGroupsRegistry::x_PrintSelected(), and CQueue::x_ResetDueTo().

◆ get_blocks_manager() [1/2] ◆ get_blocks_manager() [2/2]

get access to memory manager (internal) Use only if you are BitMagic library

Definition at line 2066 of file bm.h.

◆ get_enumerator() ◆ get_first()

find first 1 bit in vector. Function may return 0 and this requires an extra check if bit 0 is actually set or bit-vector is empty

Returns
Index of the first 1 bit, may return 0
See also
get_next, find, extract_next, find_reverse

Definition at line 1600 of file bm.h.

Referenced by BvectorShiftTest(), CSeqTable_multi_data::ChangeToBit(), CheckVectors(), bm::bvector_mini< A >::compare(), DesrializationTest2(), EmptyBVTest(), EnumeratorTest(), CJobStatusTracker::GetMinJobID(), GetNextTest(), ResizeTest(), SerializationOperation(), StressTest(), TestSparseVectorScan(), and CSeqTable_sparse_index::x_GetFirstRowWithValue().

◆ get_new_blocks_strat() ◆ get_next()

Finds the number of the next bit ON.

Parameters
prev - Index of the previously found bit.
Returns
Index of the next bit which is ON or 0 if not found.
See also
get_first, find, extract_next, find_reverse

Definition at line 1609 of file bm.h.

Referenced by CSeqTable_multi_data::ChangeToBit(), CheckVectors(), bm::bvector_mini< A >::compare(), DesrializationTest2(), EnumeratorTest(), CJobStatusTracker::GetNext(), GetNextTest(), ResizeTest(), and CSeqTable_sparse_index::x_GetNextRowWithValue().

◆ import()

Import integers (set bits).

(Fast, no checks).

Definition at line 4245 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::BM_SORTED, bm::get_block_coord(), i, bm::idx_arr_block_lookup_u32(), bm::idx_arr_block_lookup_u64(), bm::bvector< Alloc >::import_block(), bm::bvector< Alloc >::is_ro(), n, bm::blocks_manager< Alloc >::reserve_top_blocks(), and bm::set_block_shift.

Referenced by bm::bvector< Alloc >::clear(), bm::bvector< >::bulk_insert_iterator::flush(), bm::bvector< Alloc >::keep(), bm::bvector< >::bulk_insert_iterator::operator=(), and test_kmers().

◆ import_block()

Definition at line 4363 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_DECLARE_TEMP_BLOCK, bm::BM_GAP, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::blocks_manager< Alloc >::deoptimize_block(), bm::bvector< Alloc >::gap_block_set_no_ret(), bm::get_block_coord(), IS_FULL_BLOCK, bm::bvector< Alloc >::new_blocks_strat_, bm::bvector< Alloc >::opt_compress, bm::blocks_manager< Alloc >::optimize_block(), bm::set_block_bits_u32(), bm::set_block_bits_u64(), bm::set_block_mask, bm::set_block_size, and bm::set_total_blocks.

Referenced by bm::bvector< Alloc >::import(), and bm::bvector< Alloc >::import_sorted().

◆ import_sorted()

Import sorted integers (set bits).

(Fast, no checks).

Definition at line 4297 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bool, bm::get_block_coord(), i, bm::id_max, bm::idx_arr_block_lookup_u32(), bm::idx_arr_block_lookup_u64(), bm::bvector< Alloc >::import_block(), n, bm::bvector< Alloc >::opt_compress, bm::blocks_manager< Alloc >::optimize_bit_block(), bm::set_block_mask, and bm::set_block_shift.

◆ inc()

Increment the specified element.

Bit increment rules: 0 + 1 = 1 (no carry over) 1 + 1 = 0 (with carry over returned)

Parameters
n - index of the bit to be set
Returns
TRUE if carry over created (1+1)

Definition at line 4751 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set(), bm::gap_test_unr(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, mask, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, and bm::set_word_shift.

Referenced by BvectorIncTest(), FillSparseIntervals(), bm::bvector< >::flip(), generate_inter_test(), generate_inter_test_linear(), InterpolativeCodingTest(), IntervalEnumeratorTest(), and optimize_fill().

◆ init() [1/2]

template<typename Alloc >

Explicit post-construction initialization. Must be caled to make sure safe use of *_no_check() methods.

Definition at line 2280 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::blocks_manager< Alloc >::init_tree(), and bm::bvector< Alloc >::is_ro().

Referenced by BasicFunctionalityTest(), bm::bvector< Alloc >::build_rs_index(), bm::bvector< >::bulk_insert_iterator::bulk_insert_iterator(), bm::bvector< >::bvector(), BvectorBitForEachTest(), BvectorShiftTest(), bm::bvector< Alloc >::fill_alloc_digest(), FillSetsIntervals(), FillSetsRandom(), bm::bvector< >::insert_iterator::insert_iterator(), and test_kmers().

◆ init() [2/2]

template<typename Alloc >

◆ insert()

Insert bit into specified position All the vector content after insert position is shifted right.

Parameters
n - index of the bit to insert value - insert value
Returns
Carry over bit value (1 or 0)

Definition at line 5443 of file bm.h.

References bm::bit_block_insert(), bm::bit_block_shift_r1_unr(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::check_alloc_top_subblock(), bm::blocks_manager< Alloc >::check_allocate_block(), bm::blocks_manager< Alloc >::deoptimize_block(), bm::blocks_manager< Alloc >::extend_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_insert(), bm::gap_limit(), bm::gap_max_bits, bm::gap_shift_r1(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::blocks_manager< Alloc >::glen(), i, bm::id_max, IS_FULL_BLOCK, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, n, bm::bvector< Alloc >::set(), bm::bvector< Alloc >::set_bit_no_check(), bm::set_block_mask, bm::set_block_shift, bm::set_block_size, bm::set_sub_array_size, bm::set_top_array_size, bm::set_total_blocks, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), bm::blocks_manager< Alloc >::top_blocks_root(), bm::bvector< Alloc >::enumerator::value(), and bm::blocks_manager< Alloc >::zero_block().

Referenced by BvectorInsertTest(), and bm::bvector< Alloc >::shift_right().

◆ inserter() ◆ invert()

template<typename Alloc >

Invert/NEG all bits It should be noted, invert is affected by size() if size is set - it only inverts [0..size-1] bits.

Definition at line 3552 of file bm.h.

References bm::bit_invert(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bm::bvector< Alloc >::clear_range_no_check(), FULL_BLOCK_FAKE_ADDR, bm::gap_invert(), i, bm::id_max, IS_FULL_BLOCK, bm::bvector< Alloc >::is_ro(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::bvector< Alloc >::set_bit_no_check(), bm::blocks_manager< Alloc >::set_block_ptr(), bm::set_sub_array_size, bm::set_top_array_size, bm::bvector< Alloc >::size_, and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), BitCountChangeTest(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorFindFirstDiffTest(), BvectorShiftTest(), CountRangeTest(), EmptyBVTest(), bm::bvector< >::flip(), FreezeTest(), GAPSerializationTest0(), GetNextTest(), IntervalEnumeratorTest(), Intervals_RangesTest(), IsAllOneRangeTest(), KeepRangeTest(), bm::bvector< >::operator~(), OptimizeTest(), OrOperationsTest(), RangeCopyTest(), RangeDeserializationTest(), RankFindTest(), ResizeTest(), SerializationCompressionLevelsTest(), SetTest(), SimpleRandomFillTest(), StressTest(), StressTestAggregatorAND_SUB(), SubOperationsTest(), SwapTest(), TestRandomSubset(), and XorOperationsTest().

◆ is_all_one_range()

template<typename Alloc >

Returns true if all bits in the range are 1s (saturated interval) Function uses closed interval [left, right].

Parameters
left - index of first bit start checking right - index of last bit
Returns
true if all bits are 1, false otherwise
See also
any_range, count_range

Definition at line 3340 of file bm.h.

References bm::block_is_all_one_range(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::check_block_one(), FULL_BLOCK_FAKE_ADDR, bm::gap_max_bits, bm::blocks_manager< Alloc >::get_block(), bm::get_block_coord(), i, bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_sub_array_size, bm::bvector< Alloc >::test(), bm::blocks_manager< Alloc >::top_blocks_root(), and bm::xor_swap().

Referenced by FillSetsIntervals(), generate_bvector(), Intervals_RangesTest(), IsAllOneRangeTest(), and verify_all_one_ranges().

◆ is_init()

Return true if bvector is initialized at all.

Definition at line 1983 of file bm.h.

◆ is_ro()

Returns true if vector is read-only.

Definition at line 1060 of file bm.h.

Referenced by bm::bvector< Alloc >::and_bit_no_check(), bm::bvector< >::bit_and(), bm::bvector< Alloc >::bit_and(), bm::bvector< >::bit_or(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::bit_or_and(), bm::bvector< >::bit_sub(), bm::bvector< Alloc >::bit_sub(), bm::bvector< >::bit_xor(), bm::bvector< Alloc >::bit_xor(), bm::bvector< Alloc >::calc_stat(), bm::bvector< Alloc >::check_or_next_extract(), bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::clear_bit_no_check(), bm::bvector< Alloc >::copy(), bm::bvector< Alloc >::erase(), bm::bvector< Alloc >::freeze(), FreezeTest(), bm::bvector< Alloc >::import(), bm::bvector< Alloc >::inc(), bm::bvector< Alloc >::init(), bm::bvector< Alloc >::insert(), bm::bvector< Alloc >::invert(), bm::bvector< Alloc >::keep(), bm::bvector< Alloc >::keep_range(), bm::bvector< Alloc >::merge(), bm::bvector< Alloc >::optimize(), bm::bvector< Alloc >::optimize_range(), bm::bvector< Alloc >::resize(), SerializationOperation(), bm::bvector< Alloc >::set(), bm::bvector< Alloc >::set_bit(), bm::bvector< Alloc >::set_bit_and(), bm::bvector< Alloc >::set_bit_no_check(), bm::bvector< Alloc >::set_gap_levels(), bm::bvector< Alloc >::set_range(), bm::bvector< Alloc >::shift_left(), bm::bvector< Alloc >::shift_right(), bm::bvector< Alloc >::swap(), bm::bvector< Alloc >::sync_size(), and TestBasicBMatrixVectorSerial().

◆ keep()

Keep list of bits in this bitset, others are cleared.

This is equivalent of AND (Set Intersect), argument set as an array.

Parameters
ids - pointer on array of indexes to set ids_size - size of the input (ids) so - sort order (use BM_SORTED for faster load)
See also
set, clear

Definition at line 4105 of file bm.h.

References bm::bvector< Alloc >::bit_and(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::find_reverse(), bm::bvector< Alloc >::import(), bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), last(), and bm::bvector< Alloc >::resize().

Referenced by BvectorBulkSetTest().

◆ keep_range()

Sets all bits to zero outside of the closed interval [left,right] Expected result: 00000...0[left, right]0....0000.

Parameters
left - interval start right - interval end (closed interval)
See also
set_range

Definition at line 2353 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::keep_range_no_check(), and bm::xor_swap().

Referenced by BvectorBitForEachTest(), CheckRangeDeserial(), GAPSerializationTest0(), and KeepRangeTest().

◆ keep_range_no_check() ◆ merge()

Merge/move content from another vector.

Merge performs a logical OR operation, but the source vector is not immutable. Source content gets destroyed (memory moved) to create a union of two vectors. Merge operation can be more efficient than OR if argument is a temporary vector.

Parameters
bvect - [in, out] - source vector (NOT immutable)

Definition at line 5816 of file bm.h.

References bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::bvector< Alloc >::combine_operation_block_or(), bm::blocks_manager< Alloc >::deallocate_top_subblock(), FULL_BLOCK_FAKE_ADDR, i, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::blocks_manager< Alloc >::reserve_top_blocks(), bm::blocks_manager< Alloc >::set_block_ptr(), bm::set_sub_array_size, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::top_block_size(), and bm::blocks_manager< Alloc >::top_blocks_root().

Referenced by OrOperationsTest(), and SerializationOperation().

◆ move_from()

template<typename Alloc >

◆ none() ◆ operator!=() ◆ operator&=() ◆ operator-=() ◆ operator<() ◆ operator<=() ◆ operator=() [1/2]

Move assignment operator.

Definition at line 965 of file bm.h.

◆ operator=() [2/2]

Copy assignment operator.

Definition at line 930 of file bm.h.

◆ operator==() ◆ operator>() ◆ operator>=() ◆ operator[]() [1/2] ◆ operator[]() [2/2] ◆ operator^=() ◆ operator|=() ◆ operator~() ◆ optimize()

template<typename Alloc >

Optimize memory bitvector's memory allocation.

Function analyze all blocks in the bitvector, compresses blocks with a regular structure, frees some memory. This function is recommended after a bulk modification of the bitvector using set_bit, clear_bit or logical operations.

Optionally function can calculate vector post optimization statistics

Parameters
temp_block - externally allocated temp buffer for optimization BM_DECLARE_TEMP_BLOCK(tb) if NULL - it will allocated (and de-allocated upon exit) opt_mode - optimization level stat - statistics of memory consumption and serialization stat can also be computed by calc_stat() but it would require an extra pass
See also
optmode, optimize_gap_size, calc_stat

Definition at line 3637 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::bvector< Alloc >::calc_stat(), bm::blocks_manager< Alloc >::check_allocate_tempblock(), bm::blocks_manager< Alloc >::free_temp_block(), bm::gap_levels, bm::bv_statistics::gap_levels, bm::blocks_manager< Alloc >::glen(), bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bv_statistics::max_serialize_mem, bm::bv_statistics::memory_used, bm::blocks_manager< Alloc >::optimize_tree(), bm::bv_statistics::reset(), and bm::blocks_manager< Alloc >::stat_correction().

Referenced by AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), ArenaTest(), BasicFunctionalityTest(), BitCountChangeTest(), BvectorBitForEachTest(), BvectorEraseTest(), BvectorFindFirstDiffTest(), BvectorInsertTest(), BvectorShiftTest(), ClearAllTest(), ComparisonTest(), CountRangeTest(), CQueue::DeleteBatch(), DesrializationTest2(), EmptyBVTest(), EnumeratorTest(), CBDB_Cache::EvaluateTimeLine(), FillSetsRandomMethod(), FreezeTest(), GAPSerializationTest0(), GAPTestStress(), generate_bvector(), GenerateRandomKleenVect(), GenerateShiftTestCollection(), GenericBVectorTest(), GetNextTest(), IntervalEnumeratorTest(), Intervals_RangesTest(), KleeneLogicTest(), MaxSTest(), MutationOperationsTest(), MutationTest(), CJobStatusTracker::OptimizeMem(), OptimizeTest(), OrOperationsTest(), RangeCopyTest(), RangeDeserializationTest(), RankFindTest(), RankRangeSplitTest(), s_GetMD5Tag(), SerializationCompressionLevelsTest(), SerializationOperation(), SerializationTest(), SetTest(), SparseSerializationTest(), StressTest(), StressTestAggregatorAND_SUB(), StressTestAggregatorOR(), SubOperationsTest(), SwapTest(), TestCompressSparseSignedVector(), TestCompressSparseVector(), TestRandomSubset(), TestRankCompress(), SRemoteNodeData::x_BlacklistedOp(), CJobStatusTracker::x_IncDoneJobs(), SNSJobsAffinity::x_JobsOp(), SRemoteNodeData::x_JobsOp(), SRemoteNodeData::x_PrefAffinitiesOp(), SNSJobsAffinity::x_ReaderClientsOp(), SRemoteNodeData::x_WaitAffinitiesOp(), SNSJobsAffinity::x_WaitGetOp(), SNSJobsAffinity::x_WaitReadOp(), SNSJobsAffinity::x_WNClientsOp(), CSparseGraph::x_WriteMap(), and XorOperationsTest().

◆ optimize_gap_size()

template<typename Alloc >

◆ optimize_range()

template<typename Alloc >

◆ rank()

Returns rank of specified bit position (same as count_to())

Parameters
n - index of bit to rank rs_idx - rank-select index
Returns
population count in the range [0..n]
See also
build_rs_index
count_to_test, select, rank, rank_corrected

Definition at line 1433 of file bm.h.

Referenced by bm::bvector< Alloc >::enumerator::decode_bit_group(), FindRank(), proxy_bmi1_select64_lz(), proxy_bmi1_select64_tz(), proxy_bmi2_select64_pdep(), RankFindTest(), RSIndexTest(), SelectTest(), bm::bvector< Alloc >::enumerator::skip(), bm::bvector< >::enumerator::skip_to_rank(), and TestCompressSparseGather().

◆ rank_corrected()

template<typename Alloc >

Returns rank corrceted by the requested border value (as -1)

This is rank function (bit-count) minus value of bit 'n' if bit-n is true function returns rank()-1 if false returns rank() faster than rank() + test().

Parameters
n - index of bit to rank rs_idx - rank-select index
Returns
population count in the range [0..n] corrected as -1 by the value of n
See also
build_rs_index
count_to_test, select, rank

Definition at line 3199 of file bm.h.

References bm::bvector< Alloc >::block_count_to(), bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, BMGAP_PTR, bool, cnt, FULL_BLOCK_FAKE_ADDR, bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, and bm::set_word_shift.

◆ recalc_count() ◆ reset() ◆ resize()

template<typename Alloc >

Change size of the bvector.

Parameters
new_size - new size in bits

Definition at line 2463 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, bm::blocks_manager< Alloc >::init_tree(), bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::blocks_manager< Alloc >::reserve(), bm::bvector< Alloc >::set_range(), and bm::bvector< Alloc >::size_.

Referenced by BvectorBulkSetTest(), BvectorInsertTest(), bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::copy(), EmptyBVTest(), CAlnStats< _TAlnIdVec >::GetAlignedIds(), bm::bvector< Alloc >::keep(), bm::bvector< >::insert_iterator::operator=(), bm::bvector< >::operator[](), CObjectIStreamAsn::ReadBitString(), CObjectIStreamAsnBinary::ReadBitString(), CObjectIStreamJson::ReadBitString(), CObjectIStreamXml::ReadBitString(), CTaxon3_request_Base::ResetOptions(), ResizeTest(), s_SetBSFromOS(), bm::bvector< Alloc >::set_bit(), bm::bvector< Alloc >::set_bit_conditional(), bm::bvector< Alloc >::set_range(), SetTest(), bm::bvector< Alloc >::sync_size(), and CAlnStats< _TAlnIdVec >::x_AddId().

◆ select()

select bit-vector position for the specified rank(bitcount)

Rank based search, counts number of 1s from specified position until finds the ranked position relative to start from position. Uses In other words: range population count between from and pos == rank.

Parameters
rank - rank to find (bitcount) pos - position with speciefied rank (relative to from position) [out] rs_idx - block count structure to accelerate rank search
See also
running_count_blocks, find_rank
Returns
true if requested rank was found

Definition at line 5283 of file bm.h.

References bm::block_find_rank(), bm::bvector< Alloc >::blockman_, BM_ASSERT, FULL_BLOCK_FAKE_ADDR, bm::gap_max_bits, bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, bm::blocks_manager< Alloc >::is_init(), and bm::set_block_size.

Referenced by BasicFunctionalityTest(), and RankFindTest().

◆ set() [1/3] ◆ set() [2/3] ◆ set() [3/3]

Sets bit n if val is true, clears bit n if val is false.

Parameters
n - index of the bit to be set val - new bit value
Returns
*this

Definition at line 4188 of file bm.h.

References BM_ASSERT, bm::bvector< Alloc >::is_ro(), n, bm::bvector< Alloc >::set_bit(), and val.

Referenced by AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), ArenaTest(), BasicFunctionalityTest(), BitCountChangeTest(), BlockDigestTest(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorFindFirstDiffTest(), BVectorInsert(), BvectorInsertTest(), BvectorShiftTest(), CheckGTSearch(), CheckRangeDeserial(), CheckSparseVectorFilter(), CountRangeTest(), CAppJobDispatcher::DeleteJob(), CBDB_Cache::DropBlobWithExpCheck(), EnumeratorTest(), FreezeTest(), GAPSerializationTest0(), generate_bvector(), generate_sparse_bv(), GetNextTest(), IntervalEnumeratorTest(), Intervals_RangesTest(), IsAllOneRangeTest(), optimize_fill(), OptimizeTest(), OrOperationsTest(), RangeCopyTest(), RangeForEachTest(), RankFindTest(), ResizeTest(), SerializationCompressionLevelsTest(), CJobStatusTracker::SetExactStatusNoLock(), SetTest(), SimpleGapFillSets(), SubOperationsTest(), SwapTest(), TestBasicMatrix(), TestCompressedSparseVectorScanGT(), TestCompressSparseVectorSerial(), TestHeapVector(), TestSignedSparseVectorSerial(), TestSparseVectorFilter(), TestSparseVectorSerial(), TestSparseVectorTransform(), TestStrSparseVectorSerial(), TestTasks(), CPhyTreeCalc::x_CalcDivergenceMatrix(), and XorOperationsTest().

◆ set_allocator_pool()

Set allocator pool for local (non-th readed) memory cyclic(lots of alloc-free ops) opertations.

Definition at line 1040 of file bm.h.

Referenced by BasicFunctionalityTest().

◆ set_bit()

Sets bit n.

Parameters
n - index of the bit to be set. val - new bit value
Returns
TRUE if bit was changed

Definition at line 4227 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, bm::id_max, bm::blocks_manager< Alloc >::init_tree(), bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), n, bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::set_bit_no_check(), bm::bvector< Alloc >::size_, and val.

Referenced by SNSJobsAffinity::AddJob(), CNSAffinityRegistry::AddJobToAffinity(), SRemoteNodeData::AddPreferredAffinity(), SNSJobsAffinity::AddReaderClient(), SNSJobsAffinity::AddReadWaitClient(), SRemoteNodeData::AddToBlacklist(), SNSJobsAffinity::AddWNClient(), SNSJobsAffinity::AddWNWaitClient(), AndOperationsTest(), BasicFunctionalityTest(), BlockLevelTest(), CQueue::ChangeAffinity(), CQueue::CheckJobsExpiry(), CNSAffinityRegistry::CheckRemoveCandidates(), CNSGroupsRegistry::CheckRemoveCandidates(), bm::bvector< >::clear_bit(), ClearAllTest(), CNSAffinityRegistry::CollectGarbage(), CNSGroupsRegistry::CollectGarbage(), ComparisonTest(), CQueue::DeleteBatch(), CTaxIdSelSet::DeSelectTaxId(), DesrializationTest2(), CNSAffinityRegistry::Dump(), CNSGroupsRegistry::Dump(), EmptyBVTest(), EnumeratorTest(), CQueue::EraseJob(), FillSets(), FillSetsRandomOne(), CNSAffinityRegistry::FinalizeAffinityDictionaryLoading(), CNSGroupsRegistry::FinalizeGroupDictionaryLoading(), GAPCheck(), SRemoteNodeData::GCBlacklist(), CQueue::GetJobForReadingOrWait(), GetNextTest(), CNSAffinityRegistry::LoadFromDump(), CNSGroupsRegistry::LoadFromDump(), MaxSTest(), SRemoteNodeData::MoveJobToBlacklist(), MutationOperationsTest(), MutationTest(), CNSNotificationList::Notify(), OrOperationsTest(), CNSAffinityRegistry::Print(), CNSGroupsRegistry::Print(), CNSClientsRegistry::PrintClientsList(), CObjectIStreamAsn::ReadBitString(), CObjectIStreamAsnBinary::ReadBitString(), CObjectIStreamJson::ReadBitString(), CObjectIStreamXml::ReadBitString(), SRemoteNodeData::RegisterJob(), SNSJobsAffinity::RemoveJob(), CNSAffinityRegistry::RemoveJobFromAffinity(), SRemoteNodeData::RemovePreferredAffinity(), SNSJobsAffinity::RemoveReaderClient(), SNSJobsAffinity::RemoveReadWaitClient(), SNSJobsAffinity::RemoveWNClient(), SNSJobsAffinity::RemoveWNWaitClient(), CQueue::RereadJob(), CNSAffinityRegistry::ResolveAffinities(), CNSAffinityRegistry::ResolveAffinity(), CNSAffinityRegistry::ResolveAffinityToken(), CNSGroupsRegistry::ResolveGroups(), CTaxIdSelSet::SelectTaxId(), SerializationTest(), bm::bvector< Alloc >::set(), CQueue::SetAffinity(), CNetScheduleAccessList::SetHosts(), CJobStatusTracker::SetStatus(), SetTest(), SimpleRandomFillTest(), CQueue::SubmitBatch(), SubOperationsTest(), SyntaxTest(), CNSClientsRegistry::Touch(), SRemoteNodeData::UnregisterGivenJob(), SRemoteNodeData::UpdateBlacklist(), CNSClientsRegistry::UpdatePreferredAffinities(), CQueue::x_ChangeReadingStatus(), CQueue::x_CheckExecutionTimeout(), CNSGroupsRegistry::x_CreateGroup(), CNSAffinityRegistry::x_DeleteAffinity(), CNSGroupsRegistry::x_DeleteSingleInMemory(), CQueue::x_FindOutdatedJobForReading(), CQueue::x_FindOutdatedPendingJob(), CQueue::x_FindVacantJob(), CNSAffinityRegistry::x_RemoveClientFromAffinities(), CQueue::x_ResetDueTo(), SRemoteNodeData::x_UpdateBlacklist(), and XorOperationsTest().

◆ set_bit_and() ◆ set_bit_conditional() ◆ set_bit_conditional_impl()

Definition at line 4784 of file bm.h.

References bm::bvector< Alloc >::blockman_, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set(), bm::bvector< Alloc >::get_new_blocks_strat(), IS_VALID_ADDR, mask, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and val.

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

◆ set_bit_no_check() [1/2]

Set bit without checking preconditions (size, etc)

Fast set bit method, without safety net. Make sure you call bvector<>::init() before setting bits with this function.

Parameters

Definition at line 4646 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set_no_ret(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::id_max, bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and val.

Referenced by bm::bvector< Alloc >::build_rs_index(), bm::bvector< >::bvector(), bm::bvector< Alloc >::erase(), bm::bvector< Alloc >::fill_alloc_digest(), FillSetsIntervals(), FillSetsRandom(), bm::bvector< Alloc >::insert(), bm::bvector< Alloc >::invert(), bm::bvector< >::insert_iterator::operator=(), bm::bvector< Alloc >::set_bit(), SetTest(), and bm::bvector< Alloc >::swap().

◆ set_bit_no_check() [2/2]

Set specified bit without checking preconditions (size, etc)

Definition at line 4597 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BMGAP_PTR, bm::blocks_manager< Alloc >::check_allocate_block(), bm::bvector< Alloc >::gap_block_set(), bm::bvector< Alloc >::get_new_blocks_strat(), bm::id_max, bm::bvector< Alloc >::is_ro(), IS_VALID_ADDR, mask, n, bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, bm::set_word_shift, and val.

◆ set_gap_levels()

template<typename Alloc >

◆ set_new_blocks_strat()

Sets new blocks allocation strategy.

Parameters
strat - Strategy code 0 - bitblocks allocation only. 1 - Blocks mutation mode (adaptive algorithm)

Definition at line 1912 of file bm.h.

Referenced by AndOperationsTest(), BlockLevelTest(), EnumeratorTest(), GetNextTest(), MutationOperationsTest(), MutationTest(), OrOperationsTest(), SerializationTest(), SimpleRandomFillTest(), StressTest(), SubOperationsTest(), and XorOperationsTest().

◆ set_range()

template<typename Alloc >

Sets all bits in the specified closed interval [left,right] Interval must be inside the bvector's size. This method DOES NOT resize vector.

Parameters
left - interval start right - interval end (closed interval) value - value to set interval in
Returns
*this
See also
clear_range

Definition at line 2368 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, bm::bvector< Alloc >::clear_range_no_check(), bm::id_max, bm::blocks_manager< Alloc >::is_init(), bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::set_range_no_check(), bm::bvector< Alloc >::size_, and bm::bvector< Alloc >::enumerator::value().

Referenced by CNSScopeRegistry::AddJobs(), AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), BasicFunctionalityTest(), BvectorBitForEachTest(), BvectorEraseTest(), BvectorFindFirstDiffTest(), BvectorInsertTest(), CheckRangeCopy(), CheckRangeDeserial(), bm::bvector< >::clear_range(), bm::bvector< Alloc >::combine_operation(), EmptyBVTest(), FillSetsIntervals(), FreezeTest(), GAPSerializationTest0(), generate_bvector(), GetNextTest(), IntervalEnumeratorTest(), Intervals_RangesTest(), IsAllOneRangeTest(), RangeForEachTest(), RankFindTest(), bm::bvector< Alloc >::resize(), ResizeTest(), SerializationCompressionLevelsTest(), bm::bvector< Alloc >::set(), SetTest(), CQueue::SubmitBatch(), SwapTest(), TestCompressSparseVectorSerial(), TestSignedSparseVectorScanGT(), TestSignedSparseVectorSerial(), TestSparseVectorScanGT(), TestSparseVectorSerial(), TestStrSparseVectorSerial(), and CSparseGraph::Update().

◆ set_range_no_check()

Set range without validity/bounds checking.

Definition at line 7835 of file bm.h.

References bm::bits_in_block, bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_IS_GAP, bm::BM_OR, bm::bvector< Alloc >::combine_operation_with_block(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), i, r(), bm::blocks_manager< Alloc >::set_all_set(), bm::set_block_mask, and bm::set_block_shift.

Referenced by bm::bvector< Alloc >::build_rs_index(), and bm::bvector< Alloc >::set_range().

◆ shift_left() ◆ shift_right() ◆ size()

Returns bvector's capacity (number of bits it can store)

return current size of the vector (bits)

Definition at line 1300 of file bm.h.

Referenced by AndOperationsTest(), BasicFunctionalityTest(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorInsertTest(), BVImportTest(), CSeqTable_multi_data::ChangeToBit(), bm::bvector< Alloc >::copy(), EmptyBVTest(), CSeqTable_sparse_index::GetIndexAt(), CSeqTable_sparse_index::HasValueAt(), bm::bvector< >::insert_iterator::operator=(), OrOperationsTest(), CObjectIStreamAsn::ReadBitString(), CObjectIStreamAsnBinary::ReadBitString(), CObjectIStreamXml::ReadBitString(), ResizeTest(), CBVector_data::SetBitVector(), SetTest(), CQueue::SubmitBatch(), SubOperationsTest(), CObjectOStreamAsn::WriteBitString(), CObjectOStreamAsnBinary::WriteBitString(), CObjectOStreamJson::WriteBitString(), CObjectOStreamXml::WriteBitString(), and XorOperationsTest().

◆ swap() [1/2]

template<typename Alloc >

Exchanges content of bv and this bvector.

Definition at line 3968 of file bm.h.

References bm::bvector< Alloc >::blockman_, bm::bvector< Alloc >::size_, bm::blocks_manager< Alloc >::swap(), and bm::xor_swap().

Referenced by BasicFunctionalityTest(), BVectorErase(), BVectorInsert(), EmptyBVTest(), bm::bvector< Alloc >::freeze(), ResizeTest(), ShiftRight(), and SyntaxTest().

◆ swap() [2/2]

swap values of bits

Parameters
idx1 - index of bit to swap with idx2 - index of bit to swap with

Definition at line 4406 of file bm.h.

References bm::bvector< Alloc >::blockman_, BM_ASSERT, BM_ASSERT_THROW, BM_IS_GAP, BMGAP_PTR, bm::blocks_manager< Alloc >::extend_gap_block(), FULL_BLOCK_FAKE_ADDR, bm::gap_bfind(), bm::bvector< Alloc >::gap_block_set_no_ret(), bm::gap_length(), bm::gap_limit(), bm::gap_set_value_cpos(), bm::gap_test_unr(), bm::get_block_coord(), bm::blocks_manager< Alloc >::get_block_ptr(), bm::blocks_manager< Alloc >::glen(), bm::id_max, bm::bvector< Alloc >::is_ro(), bm::bvector< Alloc >::set_bit_no_check(), bm::set_block_mask, bm::set_block_shift, bm::set_word_mask, and bm::set_word_shift.

◆ sync_size()

template<typename Alloc >

◆ test()

returns true if bit n is set and false is bit n is 0.

Parameters
n - Index of the bit to check.
Returns
Bit value (1 or 0)

Definition at line 1502 of file bm.h.

Referenced by AggregatorTest(), bm::bvector< Alloc >::any_range(), BlockDigestTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorInsertTest(), BvectorShiftTest(), BVImportTest(), bm::bvector< Alloc >::count_range_no_check(), EmptyBVTest(), bm::bvector< Alloc >::erase(), ExportTest(), bm::bvector< Alloc >::find_reverse(), GAPTestStress(), bm::bvector< Alloc >::is_all_one_range(), KeepRangeTest(), OrOperationsTest(), ResizeTest(), SerializationCompressionLevelsTest(), SetTest(), bm::bvector< Alloc >::shift_left(), SubOperationsTest(), SwapTest(), SyntaxTest(), bm::bvector< Alloc >::test_first_block_bit(), test_kmers(), TestBasicBMatrixVectorSerial(), TestBasicMatrix(), TestCompressedSparseVectorScan(), TestSparseFindEqStrPipeline(), TestSparseVector(), TestSparseVectorScanGT(), verify_all_one_ranges(), VerifyCountRange(), CPhyTreeCalc::x_CalcDivergenceMatrix(), and XorOperationsTest().

◆ test_first_block_bit() ◆ throw_bad_alloc() ◆ aggregator

template<class Alloc >

template<class BV >

Definition at line 794 of file bm.h.

◆ deserializer

template<class Alloc >

template<class BV , class DEC >

◆ enumerator ◆ iterator_base

Definition at line 792 of file bm.h.

◆ operation_deserializer

template<class Alloc >

template<class BV >

Definition at line 795 of file bm.h.

◆ blockman_

bitblocks manager

Definition at line 2226 of file bm.h.

Referenced by bm::bvector< Alloc >::and_bit_no_check(), bm::bvector< Alloc >::any(), bm::bvector< Alloc >::any_range(), bm::bvector< Alloc >::bit_and(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::bit_or_and(), bm::bvector< Alloc >::bit_sub(), bm::bvector< Alloc >::bit_xor(), bm::bvector< Alloc >::build_rs_index(), bm::bvector< >::bulk_insert_iterator::bulk_insert_iterator(), bm::bvector< >::bvector(), bm::bvector< Alloc >::calc_stat(), bm::bvector< Alloc >::check_or_next(), bm::bvector< Alloc >::check_or_next_extract(), bm::bvector< Alloc >::clear(), bm::bvector< Alloc >::clear_bit_no_check(), bm::bvector< Alloc >::clear_range_no_check(), bm::bvector< Alloc >::combine_operation(), bm::bvector< Alloc >::combine_operation_and(), bm::bvector< Alloc >::combine_operation_block_and(), bm::bvector< Alloc >::combine_operation_block_and_or(), bm::bvector< Alloc >::combine_operation_block_or(), bm::bvector< Alloc >::combine_operation_block_sub(), bm::bvector< Alloc >::combine_operation_block_xor(), bm::bvector< Alloc >::combine_operation_or(), bm::bvector< Alloc >::combine_operation_sub(), bm::bvector< Alloc >::combine_operation_with_block(), bm::bvector< Alloc >::combine_operation_xor(), bm::bvector< Alloc >::compare(), bm::bvector< Alloc >::copy(), bm::bvector< Alloc >::copy_range(), bm::bvector< Alloc >::copy_range_no_check(), bm::bvector< Alloc >::count(), bm::bvector< Alloc >::count_blocks(), bm::bvector< Alloc >::count_range(), bm::bvector< Alloc >::count_range_no_check(), bm::bvector< Alloc >::count_to(), bm::bvector< Alloc >::count_to_test(), bm::bvector< Alloc >::erase(), bm::bvector< Alloc >::fill_alloc_digest(), bm::bvector< Alloc >::find(), bm::bvector< Alloc >::find_first_mismatch(), bm::bvector< Alloc >::find_rank(), bm::bvector< Alloc >::find_reverse(), bm::bvector< Alloc >::gap_block_set(), bm::bvector< Alloc >::gap_block_set_no_ret(), bm::bvector< >::get_allocator(), bm::bvector< >::get_allocator_pool(), bm::bvector< Alloc >::get_bit(), bm::bvector< >::get_blocks_manager(), bm::bvector< Alloc >::import(), bm::bvector< Alloc >::import_block(), bm::bvector< Alloc >::import_sorted(), bm::bvector< Alloc >::inc(), bm::bvector< Alloc >::init(), bm::bvector< Alloc >::insert(), bm::bvector< Alloc >::invert(), bm::bvector< Alloc >::is_all_one_range(), bm::bvector< >::is_init(), bm::bvector< >::is_ro(), bm::bvector< Alloc >::keep(), bm::bvector< Alloc >::keep_range(), bm::bvector< Alloc >::merge(), bm::bvector< Alloc >::move_from(), bm::bvector< >::bulk_insert_iterator::operator=(), bm::bvector< Alloc >::optimize(), bm::bvector< Alloc >::optimize_gap_size(), bm::bvector< Alloc >::optimize_range(), bm::bvector< Alloc >::rank_corrected(), bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::select(), bm::bvector< Alloc >::set(), bm::bvector< >::set_allocator_pool(), bm::bvector< Alloc >::set_bit(), bm::bvector< Alloc >::set_bit_and(), bm::bvector< Alloc >::set_bit_conditional_impl(), bm::bvector< Alloc >::set_bit_no_check(), bm::bvector< Alloc >::set_gap_levels(), bm::bvector< Alloc >::set_range(), bm::bvector< Alloc >::set_range_no_check(), bm::bvector< Alloc >::swap(), and bm::bvector< >::bulk_insert_iterator::~bulk_insert_iterator().

◆ new_blocks_strat_ ◆ size_

size in bits

Definition at line 2228 of file bm.h.

Referenced by bm::bvector< Alloc >::bit_and(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::bit_or_and(), bm::bvector< Alloc >::bit_sub(), bm::bvector< Alloc >::bit_xor(), bm::bvector< >::bvector(), bm::bvector< Alloc >::combine_operation(), bm::bvector< Alloc >::combine_operation_and(), bm::bvector< Alloc >::combine_operation_or(), bm::bvector< Alloc >::combine_operation_sub(), bm::bvector< Alloc >::combine_operation_xor(), bm::bvector< Alloc >::copy(), bm::bvector< Alloc >::get_bit(), bm::bvector< Alloc >::insert(), bm::bvector< Alloc >::invert(), bm::bvector< Alloc >::merge(), bm::bvector< Alloc >::move_from(), bm::bvector< >::operator[](), bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::set(), bm::bvector< Alloc >::set_bit(), bm::bvector< Alloc >::set_bit_and(), bm::bvector< Alloc >::set_bit_conditional(), bm::bvector< Alloc >::set_range(), bm::bvector< >::size(), bm::bvector< Alloc >::swap(), and bm::bvector< Alloc >::sync_size().

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4