NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
bm::operation_deserializer< BV > Class Template Reference

Search Toolkit Book for bm::operation_deserializer

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

#include <util/bitset/bmserial.h>

+ Inheritance diagram for bm::operation_deserializer< BV >:
+ Collaboration diagram for bm::operation_deserializer< BV >:

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...
 

Private Types

typedef bvector_type::block_idx_type block_idx_type
 
typedef BV::blocks_manager_type blocks_manager_type
 
typedef serial_stream_iterator< bm::decoder, block_idx_typeserial_stream_current
 
typedef serial_stream_iterator< bm::decoder_big_endian, block_idx_typeserial_stream_be
 
typedef serial_stream_iterator< bm::decoder_little_endian, block_idx_typeserial_stream_le
 
typedef bm::deserializer< BV, bm::decoder_little_endiandeserializer_le
 
typedef bm::deserializer< BV, bm::decoder_big_endiandeserializer_be
 

Private Member Functions

size_type deserialize_xor (bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one)
 
void deserialize_xor_range (bvector_type &bv, const unsigned char *buf, size_type idx_from, size_type idx_to)
 

Static Private Member Functions

static size_type deserialize_xor (bvector_type &bv, bvector_type &bv_tmp, set_operation op)
 

Private Attributes

allocator_type alloc_
 
bm::word_ttemp_block_
 
bm::iterator_deserializer< BV, serial_stream_currentit_d_
 default stream iterator (same endian) More...
 
bm::iterator_deserializer< BV, serial_stream_beit_d_be_
 big-endian stream iterator More...
 
bm::iterator_deserializer< BV, serial_stream_leit_d_le_
 little-endian stream iterator More...
 
deserializer< BV, bm::decoderde_
 
deserializer_le de_le_
 
deserializer_be de_be_
 
bvector_type bv_tmp_
 
const bv_ref_vector_typeref_vect_
 xor ref.vector 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

Definition at line 926 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 930 of file bmserial.h.

◆ block_idx_type

template<typename BV >
typedef bvector_type::block_idx_type bm::operation_deserializer< BV >::block_idx_type
private

Definition at line 1028 of file bmserial.h.

◆ blocks_manager_type

template<typename BV >
typedef BV::blocks_manager_type bm::operation_deserializer< BV >::blocks_manager_type
private

Definition at line 1030 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 932 of file bmserial.h.

◆ bvector_type

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

Definition at line 929 of file bmserial.h.

◆ deserializer_be

template<typename BV >
typedef bm::deserializer<BV, bm::decoder_big_endian> bm::operation_deserializer< BV >::deserializer_be
private

Definition at line 1040 of file bmserial.h.

◆ deserializer_le

template<typename BV >
typedef bm::deserializer<BV, bm::decoder_little_endian> bm::operation_deserializer< BV >::deserializer_le
private

Definition at line 1038 of file bmserial.h.

◆ serial_stream_be

Definition at line 1034 of file bmserial.h.

◆ serial_stream_current

Definition at line 1032 of file bmserial.h.

◆ serial_stream_le

Definition at line 1036 of file bmserial.h.

◆ size_type

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

Definition at line 931 of file bmserial.h.

Constructor & Destructor Documentation

◆ operation_deserializer()

◆ ~operation_deserializer()

Definition at line 6383 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 982 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_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 996 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 6661 of file bmserial.h.

References bm::BigEndian, BM_ASSERT, bm::BM_GAP, bm::BM_HM_HXOR, bm::BM_HM_NO_BO, bm::BM_HM_SPARSE, buf, bm::globals< T >::byte_order(), bm::decoder_base::get_8(), bm::LittleEndian, and bm::set_AND.

Referenced by CheckRangeDeserial(), SerializationCompressionLevelsTest(), and SerializationOperation().

◆ deserialize_xor() [1/2]

template<class BV >
operation_deserializer< BV >::size_type bm::operation_deserializer< BV >::deserialize_xor ( bvector_type bv,
bvector_type bv_tmp,
set_operation  op 
)
staticprivate

◆ deserialize_xor() [2/2]

template<class BV >
operation_deserializer< BV >::size_type bm::operation_deserializer< BV >::deserialize_xor ( bvector_type bv,
const unsigned char *  buf,
set_operation  op,
bool  exit_on_one 
)
private

Definition at line 6453 of file bmserial.h.

References buf, bm::deserialize(), and bm::set_OR.

◆ deserialize_xor_range()

template<class BV >
void bm::operation_deserializer< BV >::deserialize_xor_range ( bvector_type bv,
const unsigned char *  buf,
size_type  idx_from,
size_type  idx_to 
)
private

◆ 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 1009 of file bmserial.h.

Referenced by SerializationCompressionLevelsTest().

Member Data Documentation

◆ alloc_

template<typename BV >
allocator_type bm::operation_deserializer< BV >::alloc_
private

◆ bv_tmp_

template<typename BV >
bvector_type bm::operation_deserializer< BV >::bv_tmp_
private

Definition at line 1057 of file bmserial.h.

◆ de_

template<typename BV >
deserializer<BV, bm::decoder> bm::operation_deserializer< BV >::de_
private

Definition at line 1053 of file bmserial.h.

◆ de_be_

template<typename BV >
deserializer_be bm::operation_deserializer< BV >::de_be_
private

Definition at line 1055 of file bmserial.h.

◆ de_le_

template<typename BV >
deserializer_le bm::operation_deserializer< BV >::de_le_
private

Definition at line 1054 of file bmserial.h.

◆ it_d_

template<typename BV >
bm::iterator_deserializer<BV, serial_stream_current> bm::operation_deserializer< BV >::it_d_
private

default stream iterator (same endian)

Definition at line 1047 of file bmserial.h.

◆ it_d_be_

template<typename BV >
bm::iterator_deserializer<BV, serial_stream_be> bm::operation_deserializer< BV >::it_d_be_
private

big-endian stream iterator

Definition at line 1049 of file bmserial.h.

◆ it_d_le_

template<typename BV >
bm::iterator_deserializer<BV, serial_stream_le> bm::operation_deserializer< BV >::it_d_le_
private

little-endian stream iterator

Definition at line 1051 of file bmserial.h.

◆ ref_vect_

template<typename BV >
const bv_ref_vector_type* bm::operation_deserializer< BV >::ref_vect_
private

xor ref.vector

Definition at line 1062 of file bmserial.h.

◆ temp_block_

template<typename BV >
bm::word_t* bm::operation_deserializer< BV >::temp_block_
private

The documentation for this class was generated from the following file:
Modified on Mon Jul 22 05:06:04 2024 by modify_doxy.py rev. 669887