sample25.cpp File Reference

Example: demo for bit-vector traversal techniques. More...

`#include <stdlib.h>`
`#include <iostream>`
`#include <vector>`
`#include <utility>`
`#include <cassert>`
`#include "bm.h"`
`#include "bmalgo.h"`
`#include "bmundef.h"`
Include dependency graph for sample25.cpp:

Go to the source code of this file.

## Data Structures

struct | bit_visitor_functor
| Visitor calss for bm::for_each_bit() algorithm It is NOT a classic functor (with function call operator() overload) For efficiency it needs to support two methods: add_bits and add_range which corresponds to different internal methods of representation of sets in the bm::bvector<> (bit-stream and D-GAP/RLE representation). More...

## Functions

static int | bit_visitor_callback (void *handle_ptr, bm::id_t bit_idx) noexcept
int | main (void)

## Detailed Description

Example: demo for bit-vector traversal techniques.

Definition in file sample25.cpp.

## Function Documentation

## bit_visitor_callback()

int bit_visitor_callback | ( | void * | handle_ptr,
|  | bm::id_t | bit_idx )

static noexcept

Examples
  sample25.cpp.

Definition at line 51 of file sample25.cpp.

Referenced by main().

## main()

int main | ( | void |  | ) |

Definition at line 122 of file sample25.cpp.

References bit_visitor_callback(), bm::for_each_bit(), bm::for_each_bit_range(), bm::bvector< Alloc >::get_enumerator(), bm::id_max, bm::bvector< Alloc >::optimize(), bm::visit_each_bit(), and bm::visit_each_bit_range().