bvsetalgebra.cpp File Reference

Example: algebra of sets operations. More...

`#include <assert.h>`
`#include <iostream>`
`#include <vector>`
`#include "bm.h"`
`#include "bmalgo.h"`
`#include "bmserial.h"`
`#include "bmaggregator.h"`
`#include "bmundef.h"`
Include dependency graph for bvsetalgebra.cpp:

Go to the source code of this file.

## Functions

static void | print_bvector (const bm::bvector<> &bv)
static void | make_BLOB (vector< unsigned char > &target_buf, bm::bvector<> &bv)
static void | DemoOR ()
static void | DemoAND ()
static void | DemoXOR ()
static void | DemoSUB ()
static void | DemoAND_OR ()
static void | DemoINV ()
static void | DemoAND_SUB ()
int | main (void)

## Detailed Description

Example: algebra of sets operations.

Definition in file bvsetalgebra.cpp.

## Function Documentation

## DemoAND()

void DemoAND | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 221 of file bvsetalgebra.cpp.

References bm::aggregator< BV >::add(), bm::bvector< Alloc >::bit_and(), bm::BM_AND, bm::BM_SORTED, bm::aggregator< BV >::combine_and(), bm::combine_and(), bm::bvector< Alloc >::combine_operation(), bm::operation_deserializer< BV >::deserialize(), bm::bvector< Alloc >::end(), bm::bvector< Alloc >::keep(), make_BLOB(), bm::bvector< Alloc >::opt_compress, print_bvector(), bm::aggregator< BV >::reset(), bm::bvector< Alloc >::resize(), bm::set_AND, and bm::aggregator< BV >::set_optimization().

Referenced by main().

## DemoAND_OR()

void DemoAND_OR | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 513 of file bvsetalgebra.cpp.

References bm::aggregator< BV >::add(), bm::bvector< Alloc >::bit_or_and(), bm::aggregator< BV >::combine_and_sub(), print_bvector(), and bm::bvector< Alloc >::resize().

Referenced by main().

## DemoAND_SUB()

void DemoAND_SUB | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 631 of file bvsetalgebra.cpp.

References bm::aggregator< BV >::add(), bm::aggregator< BV >::combine_and_sub(), print_bvector(), bm::aggregator< BV >::reset(), and bm::aggregator< BV >::set_optimization().

Referenced by main().

## DemoINV()

void DemoINV | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 603 of file bvsetalgebra.cpp.

References bm::bvector< Alloc >::invert(), print_bvector(), and bm::bvector< Alloc >::resize().

Referenced by main().

## DemoOR()

void DemoOR | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 96 of file bvsetalgebra.cpp.

References bm::aggregator< BV >::add(), bm::bvector< Alloc >::bit_or(), bm::BM_OR, bm::BM_SORTED, bm::bvector< Alloc >::combine_operation(), bm::aggregator< BV >::combine_or(), bm::combine_or(), bm::operation_deserializer< BV >::deserialize(), bm::bvector< Alloc >::end(), make_BLOB(), bm::bvector< Alloc >::merge(), bm::bvector< Alloc >::opt_compress, print_bvector(), bm::aggregator< BV >::reset(), bm::bvector< Alloc >::resize(), bm::bvector< Alloc >::set(), bm::aggregator< BV >::set_optimization(), and bm::set_OR.

Referenced by main().

## DemoSUB()

void DemoSUB | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 401 of file bvsetalgebra.cpp.

References bm::aggregator< BV >::add(), bm::bvector< Alloc >::bit_sub(), bm::BM_SORTED, bm::BM_SUB, bm::bvector< Alloc >::clear(), bm::aggregator< BV >::combine_and_sub(), bm::bvector< Alloc >::combine_operation(), bm::combine_sub(), bm::operation_deserializer< BV >::deserialize(), bm::bvector< Alloc >::end(), make_BLOB(), bm::bvector< Alloc >::opt_compress, print_bvector(), bm::aggregator< BV >::reset(), bm::bvector< Alloc >::resize(), bm::aggregator< BV >::set_optimization(), and bm::set_SUB.

Referenced by main().

## DemoXOR()

void DemoXOR | ( |  | ) |

static

Examples
  bvsetalgebra.cpp.

Definition at line 330 of file bvsetalgebra.cpp.

References bm::bvector< Alloc >::bit_xor(), bm::BM_XOR, bm::bvector< Alloc >::combine_operation(), bm::combine_xor(), bm::operation_deserializer< BV >::deserialize(), bm::bvector< Alloc >::end(), make_BLOB(), bm::bvector< Alloc >::opt_compress, print_bvector(), bm::bvector< Alloc >::resize(), and bm::set_XOR.

Referenced by main().

## main()

int main | ( | void |  | ) |

Definition at line 747 of file bvsetalgebra.cpp.

References DemoAND(), DemoAND_OR(), DemoAND_SUB(), DemoINV(), DemoOR(), DemoSUB(), and DemoXOR().

## make_BLOB()

void make_BLOB | ( | vector< unsigned char > & | target_buf,
|  | bm::bvector<> & | bv )

static

Examples
  bvsetalgebra.cpp.

Definition at line 77 of file bvsetalgebra.cpp.

References BM_DECLARE_TEMP_BLOCK, bm::bvector< Alloc >::opt_compress, bm::bvector< Alloc >::optimize(), bm::serializer< BV >::serialize(), and bm::serializer< BV >::set_compression_level().

Referenced by DemoAND(), DemoOR(), DemoSUB(), and DemoXOR().

## print_bvector()

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

static

Definition at line 64 of file bvsetalgebra.cpp.

References bm::bvector< Alloc >::first(), bm::bvector< Alloc >::size(), and bm::bvector< Alloc >::iterator_base::valid().

Referenced by DemoAND(), DemoAND_OR(), DemoAND_SUB(), DemoINV(), DemoOR(), DemoSUB(), and DemoXOR().