BitMagic-C++: bm::bv_statistics Struct Reference

BitMagic-C++

Public Member Functions | Data Fields
bm::bv_statistics Struct Reference
BitMagic Library » bvector<> container

Structure with statistical information about memory allocation footprint, serialization projection, number of vectors. More...

`#include <bmfunc.h>`

Inheritance diagram for bm::bv_statistics:
[legend]

## Public Member Functions
void | add_bit_block () BMNOEXCEPT
| cound bit block More...
void | add_gap_block (unsigned capacity, unsigned length) BMNOEXCEPT
| count gap block More...
void | reset () BMNOEXCEPT
| Reset statisctics. More...
void | add (const bv_statistics &st) BMNOEXCEPT
| Sum data from another sttructure. More...

## Data Fields
size_t | bit_blocks
| Number of bit blocks. More...
size_t | gap_blocks
| Number of GAP blocks. More...
size_t | ptr_sub_blocks
| Number of sub-blocks. More...
size_t | bv_count
| Number of bit-vectors. More...
size_t | max_serialize_mem
| estimated maximum memory for serialization More...
size_t | memory_used
| memory usage for all blocks and service tables More...
size_t | gap_cap_overhead
| gap memory overhead between length and capacity More...
gap_word_t | gap_levels [bm::gap_levels]
| GAP block lengths in the bvect. More...
unsigned long long | gaps_by_level [bm::gap_levels]
| number of GAP blocks at each level More...

## Detailed Description

Structure with statistical information about memory allocation footprint, serialization projection, number of vectors.

Definition at line 54 of file bmfunc.h.

## Member Function Documentation

## ◆ add()

void bm::bv_statistics::add | ( | const bv_statistics & | st | ) |
| inline

Sum data from another sttructure.

Definition at line 105 of file bmfunc.h.

References bit_blocks, bv_count, gap_blocks, gap_cap_overhead, max_serialize_mem, memory_used, and ptr_sub_blocks.

Referenced by bm::base_sparse_vector< Val, BV, 1 >::calc_stat(), bm::basic_bmatrix< bm::bvector<> >::optimize(), bm::base_sparse_vector< Val, BV, 1 >::optimize(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::optimize(), and bm::sparse_vector< unsigned, bm::bvector<> >::optimize().

## ◆ add_bit_block()

void bm::bv_statistics::add_bit_block | ( |  | ) |
| inline

cound bit block

Definition at line 67 of file bmfunc.h.

References bit_blocks, max_serialize_mem, memory_used, and bm::set_block_size.

## ◆ add_gap_block()

void bm::bv_statistics::add_gap_block | ( | unsigned | capacity,
|  | unsigned | length
| ) |  |
| inline

count gap block

Definition at line 76 of file bmfunc.h.

References BM_ASSERT, gap_blocks, gap_cap_overhead, gap_levels, bm::gap_levels, gaps_by_level, max_serialize_mem, and memory_used.

## ◆ reset()

void bm::bv_statistics::reset | ( |  | ) |
| inline

Reset statisctics.

Definition at line 96 of file bmfunc.h.

References bit_blocks, bv_count, gap_blocks, gap_cap_overhead, bm::gap_levels, gaps_by_level, max_serialize_mem, memory_used, and ptr_sub_blocks.

Referenced by bm::basic_bmatrix< bm::bvector<> >::optimize(), and bm::sparse_vector< unsigned, bm::bvector<> >::optimize().

## Field Documentation

## ◆ bit_blocks

size_t bm::bv_statistics::bit_blocks

Number of bit blocks.

Examples
  sample11.cpp, sample3.cpp, and sample4.cpp.

Definition at line 56 of file bmfunc.h.

Referenced by add(), add_bit_block(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), generate_bvector(), print_statistics(), reset(), and serialize_bvector().

## ◆ bv_count

size_t bm::bv_statistics::bv_count

Number of bit-vectors.

Definition at line 59 of file bmfunc.h.

Referenced by add(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), and reset().

## ◆ gap_blocks

size_t bm::bv_statistics::gap_blocks

Number of GAP blocks.

Examples
  sample11.cpp, sample3.cpp, and sample4.cpp.

Definition at line 57 of file bmfunc.h.

Referenced by add(), add_gap_block(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), generate_bvector(), print_statistics(), reset(), and serialize_bvector().

## ◆ gap_cap_overhead

size_t bm::bv_statistics::gap_cap_overhead

gap memory overhead between length and capacity

Definition at line 62 of file bmfunc.h.

Referenced by add(), add_gap_block(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), and reset().

## ◆ gap_levels

gap_word_t bm::bv_statistics::gap_levels[bm::gap_levels]

GAP block lengths in the bvect.

Definition at line 63 of file bmfunc.h.

Referenced by add_gap_block().

## ◆ gaps_by_level

unsigned long long bm::bv_statistics::gaps_by_level[bm::gap_levels]

number of GAP blocks at each level

Definition at line 64 of file bmfunc.h.

Referenced by add_gap_block(), and reset().

## ◆ max_serialize_mem

size_t bm::bv_statistics::max_serialize_mem

estimated maximum memory for serialization

Examples
  sample3.cpp, sample4.cpp, and xsample01.cpp.

Definition at line 60 of file bmfunc.h.

Referenced by add(), add_bit_block(), add_gap_block(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), convert_bv2bvs(), print_statistics(), reset(), bm::serializer< bvector_type >::serialize(), and serialize_bvector().

## ◆ memory_used

size_t bm::bv_statistics::memory_used

memory usage for all blocks and service tables

Examples
  sample3.cpp, sample4.cpp, strsvsample03.cpp, strsvsample05.cpp, and xsample01.cpp.

Definition at line 61 of file bmfunc.h.

Referenced by add(), add_bit_block(), add_gap_block(), calc_memory_footprint(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), main(), print_statistics(), reset(), and serialize_bvector().

## ◆ ptr_sub_blocks

size_t bm::bv_statistics::ptr_sub_blocks

Number of sub-blocks.

Definition at line 58 of file bmfunc.h.

Referenced by add(), bm::str_sparse_vector< CharType, BV, MAX_STR_SIZE >::calc_stat(), and reset().

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

- bmfunc.h