bm::blocks_manager< Alloc, MS > Class Template Reference
[The Main bvector<> Group]

Search Toolkit Book for bm::blocks_manager

#include <bmblocks.h>

List of all members.


Detailed Description

template<class Alloc, class MS>
class bm::blocks_manager< Alloc, MS >

bitvector blocks manager Embedded class managing bit-blocks on very low level. Includes number of functor classes used in different bitset algorithms.

Definition at line 45 of file bmblocks.h.

Public Types

typedef Alloc allocator_type

Public Member Functions

 blocks_manager (const gap_word_t *glevel_len, bm::id_t max_bits, const Alloc &alloc=Alloc())
 blocks_manager (const blocks_manager &blockman)
 ~blocks_manager ()
void free_ptr (bm::word_t **ptr)
unsigned compute_top_block_size (bm::id_t bits_to_store)
 Compute size of the block array needed to store bits.
bm::id_t capacity () const
 Returns current capacity (bits).
bm::word_tget_block (unsigned nb) const
 Finds block in 2-level blocks array.
bm::word_tget_block (unsigned nb, int *no_more_blocks) const
 Finds block in 2-level blocks array Specilized version of get_block(unsigned), returns an additional condition when there are no more blocks.
void get_block_coord (unsigned nb, unsigned *i, unsigned *j) const
 Recalculate absolute block address into coordinates.
unsigned find_next_nz_block (unsigned nb, bool deep_scan=true) const
 Find the next non-zero block starting from nb.
const bm::word_tget_block (unsigned i, unsigned j) const
 Finds block in 2-level blocks array.
const bm::word_t *const * get_topblock (unsigned i) const
 Function returns top-level block in 2-level blocks array.
bm::word_t *** get_rootblock () const
 Returns root block in the tree.
void set_block_all_set (unsigned nb)
bm::word_tmake_bit_block (unsigned nb)
 Create all-zeros bit block.
bm::word_tcheck_allocate_block (unsigned nb, unsigned content_flag, int initial_block_type, int *actual_block_type, bool allow_null_ret=true)
 Function checks if block is not yet allocated, allocates it and sets to all-zero or all-one bits.
void set_all_zero (bool free_mem)
 Fills all blocks with 0.
void set_all_one ()
bm::word_tset_block (unsigned nb, bm::word_t *block)
 Places new block into descriptors table, returns old block's address.
bm::word_tset_block (unsigned nb, bm::word_t *block, bool gap)
 Places new block into descriptors table, returns old block's address.
void set_block_ptr (unsigned nb, bm::word_t *block)
 Places new block into blocks table.
bm::word_tconvert_gap2bitset (unsigned nb, gap_word_t *gap_block=0)
 Converts block from type gap to conventional bitset block.
bm::word_tdeoptimize_block (unsigned nb)
 Make sure block turns into true bit-block if it is GAP or a full block.
bm::word_tzero_block (unsigned nb)
 Free block, make it zero pointer in the tree.
bm::id_t block_bitcount (const bm::word_t *block, unsigned idx) const
 Count number of bits ON in the block.
bm::gap_word_textend_gap_block (unsigned nb, gap_word_t *blk)
 Extends GAP block to the next level or converts it to bit block.
bool is_block_gap (unsigned nb) const
void set_block_bit (unsigned nb)
void set_block_gap (unsigned nb)
bool is_block_zero (unsigned nb, const bm::word_t *blk, bool deep_scan=true) const
bool is_block_one (unsigned nb, const bm::word_t *blk, bool deep_scan=true) const
 Checks if block has only 1 bits.
bm::word_tcheck_allocate_tempblock ()
void set_glen (const gap_word_t *glevel_len)
bm::gap_word_tallocate_gap_block (unsigned level, gap_word_t *src=0, const gap_word_t *glevel_len=0)
unsigned mem_used () const
bool is_subblock_null (unsigned nsub) const
 Returns true if second level block pointer is 0.
bm::word_t *** blocks_root ()
const gap_word_tglen () const
 Returns current GAP level vector.
unsigned glen (unsigned level) const
 Returns GAP level length for specified level.
void swap (blocks_manager &bm)
 Swaps content.
unsigned top_block_size () const
 Returns size of the top block array in the tree.
unsigned effective_top_block_size () const
 Returns effective size of the top block array in the tree Effective size excludes NULL pointers at the top descriptor end.
void reserve (unsigned max_bits)
 reserve capacity for specified number of bits
void reserve_top_blocks (unsigned top_blocks)
 Make sure blocks manager has enough blocks capacity.
allocator_typeget_allocator ()
 Returns reference on the allocator.
allocator_type get_allocator () const
 Returns allocator.

Private Member Functions

void operator= (const blocks_manager &)
void deinit_tree ()

Private Attributes

bm::word_t *** blocks_
 Tree of blocks.
unsigned top_block_size_
 Size of the top level block array in blocks_ tree.
unsigned effective_top_block_size_
 Effective size of the top level block array in blocks_ tree.
bm::word_ttemp_block_
 Temp block.
gap_word_t glevel_len_ [bm::gap_levels]
 vector defines gap block lengths for different levels
allocator_type alloc_
 allocator

Classes

class  block_any_func
 Functor detects if any bit set. More...
class  block_copy_func
 Block copy functor. More...
class  block_count_arr_func
 Bitcounting functor filling the block counts array. More...
class  block_count_base
 Base class for bitcounting functors. More...
class  block_count_change_func
 bit value change counting functor More...
class  block_count_func
 Bitcounting functor. More...
class  block_free_func
 Block deallocation functor. More...
class  block_invert_func
 Bitblock invert functor. More...
class  block_one_func
 Fill block with all-one bits functor. More...
class  block_opt_func
class  block_zero_func
 Set block zero functor. More...
class  bm_func_base
 Base functor class (block visitor). More...
class  bm_func_base_const
 Base functor class connected for "constant" functors. More...
class  gap_level_func


Member Typedef Documentation

template<class Alloc, class MS>
typedef Alloc bm::blocks_manager< Alloc, MS >::allocator_type
 

Definition at line 49 of file bmblocks.h.


Constructor & Destructor Documentation

template<class Alloc, class MS>
bm::blocks_manager< Alloc, MS >::blocks_manager const gap_word_t glevel_len,
bm::id_t  max_bits,
const Alloc &  alloc = Alloc()
[inline]
 

Definition at line 642 of file bmblocks.h.

template<class Alloc, class MS>
bm::blocks_manager< Alloc, MS >::blocks_manager const blocks_manager< Alloc, MS > &  blockman  )  [inline]
 

Definition at line 668 of file bmblocks.h.

References bm::blocks_manager< Alloc, MS >::blocks_root(), endif, bm::for_each_nzblock(), bm::blocks_manager< Alloc, MS >::glevel_len_, and bm::set_array_size.

template<class Alloc, class MS>
bm::blocks_manager< Alloc, MS >::~blocks_manager  )  [inline]
 

Definition at line 693 of file bmblocks.h.


Member Function Documentation

template<class Alloc, class MS>
bm::gap_word_t* bm::blocks_manager< Alloc, MS >::allocate_gap_block unsigned  level,
gap_word_t src = 0,
const gap_word_t glevel_len = 0
[inline]
 

Definition at line 1309 of file bmblocks.h.

References bm::gap_length(), and len.

Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block(), bm::blocks_manager< Alloc, MS >::block_opt_func::operator()(), and bm::blocks_manager< Alloc, MS >::gap_level_func::operator()().

template<class Alloc, class MS>
bm::id_t bm::blocks_manager< Alloc, MS >::block_bitcount const bm::word_t block,
unsigned  idx
const [inline]
 

Count number of bits ON in the block.

Definition at line 1145 of file bmblocks.h.

References bm::bit_block_calc_count(), bm::bits_in_block, BM_IS_GAP, BMGAP_PTR, bm::gap_bit_count(), IS_FULL_BLOCK, and bm::set_block_size.

Referenced by bm::blocks_manager< Alloc, MS >::block_count_base::block_count().

template<class Alloc, class MS>
bm::word_t*** bm::blocks_manager< Alloc, MS >::blocks_root  )  [inline]
 

Definition at line 1356 of file bmblocks.h.

Referenced by bm::blocks_manager< Alloc, MS >::blocks_manager(), bm::bvector< Alloc, MS >::combine_operation(), bm::blocks_manager< Alloc, MS >::get_rootblock(), bm::bvector< Alloc, MS >::enumerator::go_first(), bm::bvector< Alloc, MS >::optimize(), and bm::bvector< Alloc, MS >::set_gap_levels().

template<class Alloc, class MS>
bm::id_t bm::blocks_manager< Alloc, MS >::capacity  )  const [inline]
 

Returns current capacity (bits).

Definition at line 726 of file bmblocks.h.

References bm::bits_in_block, bm::id_max, and bm::set_array_size.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::check_allocate_block unsigned  nb,
unsigned  content_flag,
int  initial_block_type,
int *  actual_block_type,
bool  allow_null_ret = true
[inline]
 

Function checks if block is not yet allocated, allocates it and sets to all-zero or all-one bits.

If content_flag == 1 (ALLSET block) requested and taken block is already ALLSET, function will return NULL

initial_block_type and actual_block_type : 0 - bitset, 1 - gap

Definition at line 900 of file bmblocks.h.

References bm::bit_block_set(), BM_IS_GAP, bm::gap_max_bits, bm::gap_set_all(), IS_FULL_BLOCK, and IS_VALID_ADDR.

Referenced by bm::bvector< Alloc, MS >::and_bit_no_check(), bm::bvector< Alloc, MS >::combine_operation_with_block(), bm::bvector< Alloc, MS >::set_bit_conditional_impl(), and bm::bvector< Alloc, MS >::set_bit_no_check().

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::check_allocate_tempblock  )  [inline]
 

Returns temporary block, allocates if needed.

Definition at line 1296 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::optimize().

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::compute_top_block_size bm::id_t  bits_to_store  )  [inline]
 

Compute size of the block array needed to store bits.

Parameters:
bits_to_store - supposed capacity (number of bits)
Returns:
size of the top level block

Definition at line 709 of file bmblocks.h.

References bm::id_max, bm::set_array_size, and bm::set_block_size.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::convert_gap2bitset unsigned  nb,
gap_word_t gap_block = 0
[inline]
 

Converts block from type gap to conventional bitset block.

Parameters:
nb - Block's index.
gap_block - Pointer to the gap block, if NULL block nb will be taken
Returns:
new bit block's memory

Definition at line 1074 of file bmblocks.h.

References BM_ASSERT, BMGAP_PTR, bm::gap_convert_to_bitset(), IS_VALID_ADDR, and bm::set_block_bit.

Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::deinit_tree  )  [inline, private]
 

Definition at line 1483 of file bmblocks.h.

References bm::for_each_nzblock(), and bm::set_array_size.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::deoptimize_block unsigned  nb  )  [inline]
 

Make sure block turns into true bit-block if it is GAP or a full block.

Definition at line 1105 of file bmblocks.h.

References bm::bit_block_copy(), BM_IS_GAP, and IS_FULL_BLOCK.

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::effective_top_block_size  )  const [inline]
 

Returns effective size of the top block array in the tree Effective size excludes NULL pointers at the top descriptor end.

Definition at line 1412 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::calc_stat(), bm::bvector< Alloc, MS >::combine_operation(), bm::bvector< Alloc, MS >::compare(), bm::bvector< Alloc, MS >::count(), and bm::bvector< Alloc, MS >::optimize().

template<class Alloc, class MS>
bm::gap_word_t* bm::blocks_manager< Alloc, MS >::extend_gap_block unsigned  nb,
gap_word_t blk
[inline]
 

Extends GAP block to the next level or converts it to bit block.

Parameters:
nb - Block's linear index.
blk - Blocks's pointer
Returns:
new GAP block pointer or NULL if block type mutated

Definition at line 1174 of file bmblocks.h.

References BMSET_PTRGAP, bm::gap_length(), bm::gap_level(), bm::gap_max_buff_len, bm::gap_max_level, and len.

Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block().

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::find_next_nz_block unsigned  nb,
bool  deep_scan = true
const [inline]
 

Find the next non-zero block starting from nb.

Parameters:
nb - block index
deep_scan - flag to perform detailed bit-block analysis
Returns:
bm::set_total_blocks - no more blocks

Definition at line 789 of file bmblocks.h.

References bm::set_array_size.

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::free_ptr bm::word_t **  ptr  )  [inline]
 

Definition at line 699 of file bmblocks.h.

template<class Alloc, class MS>
allocator_type bm::blocks_manager< Alloc, MS >::get_allocator  )  const [inline]
 

Returns allocator.

Definition at line 1477 of file bmblocks.h.

template<class Alloc, class MS>
allocator_type& bm::blocks_manager< Alloc, MS >::get_allocator  )  [inline]
 

Returns reference on the allocator.

Definition at line 1473 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::allocate_tempblock(), bm::bvector< Alloc, MS >::combine_operation_with_block(), bm::blocks_manager< Alloc, MS >::block_opt_func::free_block(), bm::bvector< Alloc, MS >::free_tempblock(), bm::blocks_manager< Alloc, MS >::block_opt_func::on_empty_top(), bm::blocks_manager< Alloc, MS >::block_copy_func::operator()(), bm::blocks_manager< Alloc, MS >::block_free_func::operator()(), bm::blocks_manager< Alloc, MS >::block_zero_func::operator()(), bm::blocks_manager< Alloc, MS >::block_opt_func::operator()(), bm::blocks_manager< Alloc, MS >::gap_level_func::operator()(), and bm::bvector< Alloc, MS >::set_range_no_check().

template<class Alloc, class MS>
const bm::word_t* bm::blocks_manager< Alloc, MS >::get_block unsigned  i,
unsigned  j
const [inline]
 

Finds block in 2-level blocks array.

Parameters:
i - top level block index
j - second level block index
Returns:
block adress or NULL if not yet allocated

Definition at line 821 of file bmblocks.h.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::get_block unsigned  nb,
int *  no_more_blocks
const [inline]
 

Finds block in 2-level blocks array Specilized version of get_block(unsigned), returns an additional condition when there are no more blocks.

Parameters:
nb - Index of block (logical linear number)
no_more_blocks - 1 if there are no more blocks at all
Returns:
block adress or NULL if not yet allocated

Definition at line 758 of file bmblocks.h.

References bm::set_array_mask, and bm::set_array_shift.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::get_block unsigned  nb  )  const [inline]
 

Finds block in 2-level blocks array.

Parameters:
nb - Index of block (logical linear number)
Returns:
block adress or NULL if not yet allocated

Definition at line 738 of file bmblocks.h.

References bm::set_array_mask, and bm::set_array_shift.

Referenced by bm::bvector< Alloc, MS >::count_range(), bm::bvector< Alloc, MS >::get_bit(), and bm::bvector< Alloc, MS >::set_range_no_check().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::get_block_coord unsigned  nb,
unsigned *  i,
unsigned *  j
const [inline]
 

Recalculate absolute block address into coordinates.

Definition at line 774 of file bmblocks.h.

References BM_ASSERT, bm::set_array_mask, and bm::set_array_shift.

template<class Alloc, class MS>
bm::word_t*** bm::blocks_manager< Alloc, MS >::get_rootblock  )  const [inline]
 

Returns root block in the tree.

Definition at line 841 of file bmblocks.h.

References bm::blocks_manager< Alloc, MS >::blocks_root().

Referenced by bm::bvector< Alloc, MS >::count(), bm::bvector< Alloc, MS >::invert(), and bm::blocks_manager< Alloc, MS >::block_opt_func::on_empty_top().

template<class Alloc, class MS>
const bm::word_t* const* bm::blocks_manager< Alloc, MS >::get_topblock unsigned  i  )  const [inline]
 

Function returns top-level block in 2-level blocks array.

Parameters:
i - top level block index
Returns:
block adress or NULL if not yet allocated

Definition at line 833 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::calc_stat(), and bm::bvector< Alloc, MS >::compare().

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::glen unsigned  level  )  const [inline]
 

Returns GAP level length for specified level.

Parameters:
level - level number

Definition at line 1371 of file bmblocks.h.

template<class Alloc, class MS>
const gap_word_t* bm::blocks_manager< Alloc, MS >::glen  )  const [inline]
 

Returns current GAP level vector.

Definition at line 1363 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::and_bit_no_check(), bm::bvector< Alloc, MS >::calc_stat(), bm::bvector< Alloc, MS >::combine_operation_with_block(), bm::blocks_manager< Alloc, MS >::block_copy_func::operator()(), bm::blocks_manager< Alloc, MS >::block_free_func::operator()(), bm::blocks_manager< Alloc, MS >::block_opt_func::operator()(), bm::blocks_manager< Alloc, MS >::gap_level_func::operator()(), bm::bvector< Alloc, MS >::optimize(), bm::bvector< Alloc, MS >::set_bit_conditional_impl(), bm::bvector< Alloc, MS >::set_bit_no_check(), and bm::bvector< Alloc, MS >::set_range_no_check().

template<class Alloc, class MS>
bool bm::blocks_manager< Alloc, MS >::is_block_gap unsigned  nb  )  const [inline]
 

Definition at line 1197 of file bmblocks.h.

References BMPTR_TESTBIT0.

Referenced by bm::blocks_manager< Alloc, MS >::block_copy_func::operator()().

template<class Alloc, class MS>
bool bm::blocks_manager< Alloc, MS >::is_block_one unsigned  nb,
const bm::word_t blk,
bool  deep_scan = true
const [inline]
 

Checks if block has only 1 bits.

Parameters:
nb - Index of the block.
blk - Block's pointer
deep_scan - flag to do full bit block verification (scan) when deep scan is not requested result can be approximate
Returns:
true if block consists of 1 bits.

Definition at line 1270 of file bmblocks.h.

References BM_IS_GAP, BMGAP_PTR, bm::gap_is_all_one(), bm::gap_max_bits, bm::is_bits_one(), IS_FULL_BLOCK, and bm::set_block_size.

template<class Alloc, class MS>
bool bm::blocks_manager< Alloc, MS >::is_block_zero unsigned  nb,
const bm::word_t blk,
bool  deep_scan = true
const [inline]
 

Definition at line 1238 of file bmblocks.h.

References BM_IS_GAP, BMGAP_PTR, bm::gap_is_all_zero(), bm::gap_max_bits, and bm::set_block_size.

template<class Alloc, class MS>
bool bm::blocks_manager< Alloc, MS >::is_subblock_null unsigned  nsub  )  const [inline]
 

Returns true if second level block pointer is 0.

Definition at line 1350 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::check_or_next(), and bm::bvector< Alloc, MS >::check_or_next_extract().

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::make_bit_block unsigned  nb  )  [inline]
 

Create all-zeros bit block.

Old block (if exists) is deleted.

Definition at line 872 of file bmblocks.h.

References bm::bit_block_set(), BM_IS_GAP, BMGAP_PTR, and IS_VALID_ADDR.

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::mem_used  )  const [inline]
 

Definition at line 1330 of file bmblocks.h.

References bm::set_array_size, and bm::set_block_size.

Referenced by bm::bvector< Alloc, MS >::optimize().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::operator= const blocks_manager< Alloc, MS > &   )  [private]
 

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::reserve unsigned  max_bits  )  [inline]
 

reserve capacity for specified number of bits

Definition at line 1439 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::resize().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::reserve_top_blocks unsigned  top_blocks  )  [inline]
 

Make sure blocks manager has enough blocks capacity.

Definition at line 1451 of file bmblocks.h.

References BM_ASSERT, and bm::set_array_size.

Referenced by bm::bvector< Alloc, MS >::combine_operation().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_all_one  )  [inline]
 

Replaces all blocks with ALL_ONE block.

Definition at line 953 of file bmblocks.h.

References bm::for_each_block(), and bm::set_array_size.

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_all_zero bool  free_mem  )  [inline]
 

Fills all blocks with 0.

Parameters:
free_mem - if true function frees the resources

Definition at line 944 of file bmblocks.h.

References bm::for_each_nzblock(), and bm::set_array_size.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::set_block unsigned  nb,
bm::word_t block,
bool  gap
[inline]
 

Places new block into descriptors table, returns old block's address.

Old block is not deleted.

Definition at line 1003 of file bmblocks.h.

References BMPTR_CLEARBIT0, BMPTR_SETBIT0, bm::set_array_mask, bm::set_array_shift, and bm::set_array_size.

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::set_block unsigned  nb,
bm::word_t block
[inline]
 

Places new block into descriptors table, returns old block's address.

Old block is not deleted.

Definition at line 964 of file bmblocks.h.

References bm::set_array_mask, bm::set_array_shift, and bm::set_array_size.

Referenced by bm::blocks_manager< Alloc, MS >::block_invert_func::operator()(), and bm::bvector< Alloc, MS >::set_range_no_check().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_block_all_set unsigned  nb  )  [inline]
 

Definition at line 848 of file bmblocks.h.

References BM_IS_GAP, BMGAP_PTR, FULL_BLOCK_ADDR, and bm::set_block_bit.

Referenced by bm::blocks_manager< Alloc, MS >::block_one_func::operator()().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_block_bit unsigned  nb  )  [inline]
 

Definition at line 1207 of file bmblocks.h.

References BMPTR_CLEARBIT0.

Referenced by bm::blocks_manager< Alloc, MS >::block_opt_func::free_block(), bm::blocks_manager< Alloc, MS >::gap_level_func::operator()(), and bm::bvector< Alloc, MS >::set_range_no_check().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_block_gap unsigned  nb  )  [inline]
 

Definition at line 1218 of file bmblocks.h.

References BMPTR_SETBIT0.

Referenced by bm::blocks_manager< Alloc, MS >::block_opt_func::operator()().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_block_ptr unsigned  nb,
bm::word_t block
[inline]
 

Places new block into blocks table.

Definition at line 1061 of file bmblocks.h.

References BM_ASSERT, bm::set_array_mask, and bm::set_array_shift.

Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block(), bm::blocks_manager< Alloc, MS >::block_zero_func::operator()(), bm::blocks_manager< Alloc, MS >::block_invert_func::operator()(), bm::blocks_manager< Alloc, MS >::block_opt_func::operator()(), and bm::blocks_manager< Alloc, MS >::gap_level_func::operator()().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::set_glen const gap_word_t glevel_len  )  [inline]
 

Assigns new GAP lengths vector

Definition at line 1303 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::set_gap_levels().

template<class Alloc, class MS>
void bm::blocks_manager< Alloc, MS >::swap blocks_manager< Alloc, MS > &  bm  )  [inline]
 

Swaps content.

Parameters:
bm another blocks manager

Definition at line 1379 of file bmblocks.h.

References bm::blocks_manager< Alloc, MS >::blocks_, BM_ASSERT, bm::blocks_manager< Alloc, MS >::effective_top_block_size_, bm::gap_levels, bm::blocks_manager< Alloc, MS >::glevel_len_, bm::blocks_manager< Alloc, MS >::top_block_size_, and bm::xor_swap().

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::top_block_size  )  const [inline]
 

Returns size of the top block array in the tree.

Definition at line 1404 of file bmblocks.h.

Referenced by bm::bvector< Alloc, MS >::combine_operation(), bm::bvector< Alloc, MS >::enumerator::go_first(), bm::bvector< Alloc, MS >::invert(), and bm::bvector< Alloc, MS >::set_gap_levels().

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::zero_block unsigned  nb  )  [inline]
 

Free block, make it zero pointer in the tree.

Definition at line 1125 of file bmblocks.h.

References BM_IS_GAP, and BMGAP_PTR.

Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block().


Member Data Documentation

template<class Alloc, class MS>
allocator_type bm::blocks_manager< Alloc, MS >::alloc_ [private]
 

allocator

Definition at line 1516 of file bmblocks.h.

template<class Alloc, class MS>
bm::word_t*** bm::blocks_manager< Alloc, MS >::blocks_ [private]
 

Tree of blocks.

Definition at line 1502 of file bmblocks.h.

Referenced by bm::blocks_manager< Alloc, MS >::swap().

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::effective_top_block_size_ [private]
 

Effective size of the top level block array in blocks_ tree.

Definition at line 1506 of file bmblocks.h.

Referenced by bm::blocks_manager< Alloc, MS >::swap().

template<class Alloc, class MS>
gap_word_t bm::blocks_manager< Alloc, MS >::glevel_len_[bm::gap_levels] [private]
 

vector defines gap block lengths for different levels

Definition at line 1514 of file bmblocks.h.

Referenced by bm::blocks_manager< Alloc, MS >::blocks_manager(), and bm::blocks_manager< Alloc, MS >::swap().

template<class Alloc, class MS>
bm::word_t* bm::blocks_manager< Alloc, MS >::temp_block_ [private]
 

Temp block.

Definition at line 1512 of file bmblocks.h.

template<class Alloc, class MS>
unsigned bm::blocks_manager< Alloc, MS >::top_block_size_ [private]
 

Size of the top level block array in blocks_ tree.

Definition at line 1504 of file bmblocks.h.

Referenced by bm::blocks_manager< Alloc, MS >::swap().


The documentation for this class was generated from the following file:
Generated on Wed Dec 9 08:16:16 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:20:18 2009 by modify_doxy.py rev. 173732