sample3.cpp File Reference

Example: bvector<> with different allocation/compression strategies. More...

`#include <stdlib.h>`
`#include <iostream>`
`#include "bm.h"`
`#include "bmundef.h"`
Include dependency graph for sample3.cpp:

Go to the source code of this file.

## Functions

static void | fill_bvector (bm::bvector<> *bv1, bm::bvector<> *bv2)
static void | print_statistics (const bm::bvector<> &bv)
int | main (void)

## Variables

const unsigned | MAX_VALUE = 1000000

## Detailed Description

Example: bvector<> with different allocation/compression strategies.

Definition in file sample3.cpp.

## Function Documentation

## fill_bvector()

void fill_bvector | ( | bm::bvector<> * | bv1,
|  | bm::bvector<> * | bv2 )

static

Examples
  sample14.cpp, sample15.cpp, sample26.cpp, sample3.cpp, and sample4.cpp.

Definition at line 48 of file sample3.cpp.

References MAX_VALUE, and bm::bvector< Alloc >::set_bit().

Referenced by main().

## main()

int main | ( | void |  | ) |

Definition at line 74 of file sample3.cpp.

References bm::BM_GAP, fill_bvector(), bm::bvector< Alloc >::optimize(), print_statistics(), and bm::bvector< Alloc >::set_new_blocks_strat().

## print_statistics()

void print_statistics | ( | const bm::bvector<> & | bv | ) |

static

Examples
  sample26.cpp, sample3.cpp, and sample4.cpp.

Definition at line 61 of file sample3.cpp.

References bm::bv_statistics::bit_blocks, bm::bvector< Alloc >::calc_stat(), bm::bvector< Alloc >::count(), bm::bv_statistics::gap_blocks, bm::bv_statistics::max_serialize_mem, and bm::bv_statistics::memory_used.

Referenced by main().

## Variable Documentation

## MAX_VALUE

const unsigned MAX_VALUE = 1000000

Examples
  sample14.cpp, sample15.cpp, sample26.cpp, sample3.cpp, and sample4.cpp.

Definition at line 42 of file sample3.cpp.

Referenced by fill_bvector(), fill_bvector(), fill_bvector(), fill_bvector(), and fill_bvector().