BitMagic-C++: bm::operation_deserializer< BV > Class Template Reference

BitMagic-C++

Public Types | Public Member Functions
bm::operation_deserializer< BV > Class Template Reference
BitMagic Library » bvector<> container » bvector<> serialization

Deserializer, performs logical operations between bit-vector and serialized bit-vector. More...

`#include <bmserial.h>`

Inheritance diagram for bm::operation_deserializer< BV >:
[legend]

## Public Types
typedef BV | bvector_type
typedef BV::allocator_type | allocator_type
typedef bvector_type::size_type | size_type
typedef bm::bv_ref_vector< BV > | bv_ref_vector_type

## Public Member Functions
| operation_deserializer ()
| ~operation_deserializer ()
size_type | deserialize (bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one=false)
| Deserialize bvector using buffer as set operation argument. More...
void | deserialize_range (bvector_type &bv, const unsigned char *buf, size_type idx_from, size_type idx_to)
size_type | deserialize (bvector_type &bv, const unsigned char *buf, bm::word_t *, set_operation op=bm::set_OR, bool exit_on_one=false)
| Obsolete! Deserialize bvector using buffer as set operation argument. More...
void | deserialize_range (bvector_type &bv, const unsigned char *buf, bm::word_t *, size_type idx_from, size_type idx_to)
void | set_ref_vectors (const bv_ref_vector_type *ref_vect)
| Attach collection of reference vectors for XOR serialization (no transfer of ownership for the pointer) More...

## Detailed Description

### template<typename BV>
class bm::operation_deserializer< BV >

Deserializer, performs logical operations between bit-vector and serialized bit-vector.

This utility class potentially provides faster and/or more memory efficient operation than more conventional deserialization into memory bvector and then logical operation

Examples
  bvsetalgebra.cpp, sample14.cpp, and xsample01.cpp.

Definition at line 824 of file bmserial.h.

## Member Typedef Documentation

## ◆ allocator_type

template<typename BV >

typedef BV::allocator_type bm::operation_deserializer< BV >::allocator_type

Definition at line 828 of file bmserial.h.

## ◆ bv_ref_vector_type

template<typename BV >

typedef bm::bv_ref_vector<BV> bm::operation_deserializer< BV >::bv_ref_vector_type

Definition at line 830 of file bmserial.h.

## ◆ bvector_type

template<typename BV >

typedef BV bm::operation_deserializer< BV >::bvector_type

Definition at line 827 of file bmserial.h.

## ◆ size_type

template<typename BV >

typedef bvector_type::size_type bm::operation_deserializer< BV >::size_type

Definition at line 829 of file bmserial.h.

## Constructor & Destructor Documentation

## ◆ operation_deserializer()

template<class BV >

bm::operation_deserializer< BV >::operation_deserializer

Definition at line 5628 of file bmserial.h.

## ◆ ~operation_deserializer()

template<class BV >

bm::operation_deserializer< BV >::~operation_deserializer

Definition at line 5636 of file bmserial.h.

## Member Function Documentation

## ◆ deserialize() [1/2]

template<typename BV >

size_type bm::operation_deserializer< BV >::deserialize | ( | bvector_type & | bv,
|  | const unsigned char * | buf,
|  | bm::word_t * | ,
|  | set_operation | op = `bm::set_OR`,
|  | bool | exit_on_one = `false`
| ) |  |
| inline

Obsolete! Deserialize bvector using buffer as set operation argument.

Parameters

  bv | - target bvector
  buf | - serialized buffer as a logical argument
  op | - set algebra operation (default: OR)
  exit_on_one | - quick exit if set operation found some result

Returns
  bitcount (for COUNT_* operations)

Definition at line 880 of file bmserial.h.

## ◆ deserialize() [2/2]

template<class BV >

operation_deserializer< BV >::size_type bm::operation_deserializer< BV >::deserialize | ( | bvector_type & | bv,
|  | const unsigned char * | buf,
|  | set_operation | op,
|  | bool | exit_on_one = `false`
| ) |  |

Deserialize bvector using buffer as set operation argument.

Parameters

  bv | - target bvector
  buf | - serialized buffer used as as a logical operation argument
  op | - set algebra operation (default: OR)
  exit_on_one | - quick exit if set operation found some result

Returns
  bitcount (for COUNT_* operations)

Definition at line 5772 of file bmserial.h.

Referenced by DemoAND(), DemoOR(), DemoSUB(), DemoXOR(), bm::operation_deserializer< bvector_type >::deserialize(), main(), and speed_test_bvs_index().

## ◆ deserialize_range() [1/2]

template<typename BV >

void bm::operation_deserializer< BV >::deserialize_range | ( | bvector_type & | bv,
|  | const unsigned char * | buf,
|  | bm::word_t * | ,
|  | size_type | idx_from,
|  | size_type | idx_to
| ) |  |
| inline

Deserialize range using mask vector (AND)

Parameters

  bv | - target bvector (should be set ranged)
  buf | - serialized buffer pointer
  idx_from | - range of bits set for deserialization [from..to]
  idx_to | - range of bits [from..to]

Definition at line 894 of file bmserial.h.

## ◆ deserialize_range() [2/2]

template<class BV >

void bm::operation_deserializer< BV >::deserialize_range | ( | bvector_type & | bv,
|  | const unsigned char * | buf,
|  | size_type | idx_from,
|  | size_type | idx_to
| ) |  |

Deserialize range using mask vector (AND)

Parameters

  bv | - target bvector (should be set ranged)
  buf | - serialized buffer pointer
  idx_from | - range of bits set for deserialization [from..to]
  idx_to | - range of bits [from..to]

Definition at line 5825 of file bmserial.h.

Referenced by bm::operation_deserializer< bvector_type >::deserialize_range().

## ◆ set_ref_vectors()

template<typename BV >

void bm::operation_deserializer< BV >::set_ref_vectors | ( | const bv_ref_vector_type * | ref_vect | ) |
| inline

Attach collection of reference vectors for XOR serialization (no transfer of ownership for the pointer)

Definition at line 907 of file bmserial.h.

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

- bmserial.h