BitMagic-C++
|
List of reference bit-vectors with their true index associations. More...
#include <bmxor.h>
Public Types | |
typedef BV | bvector_type |
typedef bvector_type::size_type | size_type |
typedef bvector_type * | bvector_type_ptr |
typedef const bvector_type * | bvector_type_const_ptr |
typedef bvector_type::allocator_type | bv_allocator_type |
typedef bm::block_match_chain< size_type > | block_match_chain_type |
typedef bm::dynamic_heap_matrix< block_match_chain_type, bv_allocator_type > | matrix_chain_type |
Public Member Functions | |
void | reset () |
reset the collection (resize(0)) More... | |
void | add (const bvector_type *bv, size_type ref_idx) |
Add reference vector. More... | |
size_type | size () const BMNOEXCEPT |
Get reference list size. More... | |
const bvector_type * | get_bv (size_type idx) const BMNOEXCEPT |
Get reference vector by the index in this ref-vector. More... | |
size_type | get_row_idx (size_type idx) const BMNOEXCEPT |
Get reference row index by the index in this ref-vector. More... | |
size_type | find (std::size_t ref_idx) const BMNOEXCEPT |
Find vector index by the reference index. More... | |
size_type | find_bv (const bvector_type *bv) const BMNOEXCEPT |
Find vector index by the pointer. More... | |
void | fill_alloc_digest (bvector_type &bv_blocks) const |
Fill block allocation digest for all vectors in the reference collection. More... | |
template<class BMATR > | |
void | build (const BMATR &bmatr) |
Reset and build vector of references from a basic bit-matrix all NULL rows are skipped, not added to the ref.vector. More... | |
template<typename BMATR > | |
void | add_vectors (const BMATR &bmatr) |
Append basic bit-matrix to the list of reference vectors. More... | |
template<class SV > | |
void | add_sparse_vector (const SV &sv) |
Add bit-transposed sparse vector as a bit-matrix. More... | |
void | resize_xor_matrix (matrix_chain_type &matr, size_type total_blocks) const |
Utility function to resize matrix based on number of vectors and blocks. More... | |
bool | build_nb_digest_and_xor_matrix (matrix_chain_type &matr, bvector_type &bv_blocks) const |
Calculate blocks digest and resize XOR distance matrix based on total number of available blocks. More... | |
Static Public Member Functions | |
static size_type | not_found () BMNOEXCEPT |
not-found value for find methods More... | |
Protected Types | |
typedef bm::heap_vector< bvector_type_const_ptr, bv_allocator_type, true > | bvptr_vector_type |
typedef bm::heap_vector< std::size_t, bv_allocator_type, true > | bv_plane_vector_type |
Protected Attributes | |
unsigned | rows_acc_ = 0 |
total rows accumulator More... | |
bvptr_vector_type | ref_bvects_ |
reference vector pointers More... | |
bv_plane_vector_type | ref_bvects_rows_ |
reference vector row idxs More... | |
List of reference bit-vectors with their true index associations.
Each referece vector would have two alternative indexes:
|
inline |
Add reference vector.
bv | - bvector pointer |
ref_idx | - reference (row) index |
Definition at line 652 of file bmxor.h.
References BM_ASSERT, bm::bv_ref_vector< BV >::ref_bvects_, and bm::bv_ref_vector< BV >::ref_bvects_rows_.
Referenced by bm::bv_ref_vector< BV >::add_vectors().
|
inline |
Add bit-transposed sparse vector as a bit-matrix.
Definition at line 739 of file bmxor.h.
References bm::bv_ref_vector< BV >::add_vectors().
Referenced by serialize_df2().
|
inline |
Append basic bit-matrix to the list of reference vectors.
Definition at line 726 of file bmxor.h.
References bm::bv_ref_vector< BV >::add(), and bm::bv_ref_vector< BV >::rows_acc_.
Referenced by bm::bv_ref_vector< BV >::add_sparse_vector(), bm::bv_ref_vector< BV >::build(), and deserialize_df2().
|
inline |
Reset and build vector of references from a basic bit-matrix all NULL rows are skipped, not added to the ref.vector.
Definition at line 716 of file bmxor.h.
References bm::bv_ref_vector< BV >::add_vectors(), and bm::bv_ref_vector< BV >::reset().
|
inline |
Calculate blocks digest and resize XOR distance matrix based on total number of available blocks.
Definition at line 759 of file bmxor.h.
References bm::bv_ref_vector< BV >::fill_alloc_digest(), and bm::bv_ref_vector< BV >::resize_xor_matrix().
Referenced by bm::compute_sim_matrix_plan_builder< BV >::build_plan(), and bm::xor_scanner< BV >::compute_sim_model().
|
inline |
Fill block allocation digest for all vectors in the reference collection.
bv_blocks | - [out] bvector of blocks statistics |
Definition at line 699 of file bmxor.h.
References BM_DECLARE_TEMP_BLOCK, bm::bv_ref_vector< BV >::fill_alloc_digest(), bm::bv_ref_vector< BV >::ref_bvects_, and bm::bv_ref_vector< BV >::size().
Referenced by bm::bv_ref_vector< BV >::build_nb_digest_and_xor_matrix(), and bm::bv_ref_vector< BV >::fill_alloc_digest().
|
inline |
Find vector index by the reference index.
Definition at line 676 of file bmxor.h.
References bm::bv_ref_vector< BV >::not_found(), bm::bv_ref_vector< BV >::ref_bvects_rows_, and bm::bv_ref_vector< BV >::size().
|
inline |
Find vector index by the pointer.
Definition at line 687 of file bmxor.h.
References bm::bv_ref_vector< BV >::not_found(), bm::bv_ref_vector< BV >::ref_bvects_, and bm::bv_ref_vector< BV >::size().
Referenced by bm::sv_serialization_plan_builder< SV >::build_plan().
|
inline |
Get reference vector by the index in this ref-vector.
Definition at line 663 of file bmxor.h.
References bm::bv_ref_vector< BV >::ref_bvects_.
Referenced by bm::xor_scanner< BV >::get_ref_block().
|
inline |
Get reference row index by the index in this ref-vector.
Definition at line 667 of file bmxor.h.
References bm::bv_ref_vector< BV >::ref_bvects_rows_.
|
inlinestatic |
not-found value for find methods
Definition at line 672 of file bmxor.h.
Referenced by bm::sv_serialization_plan_builder< SV >::build_plan(), bm::bv_ref_vector< BV >::find(), and bm::bv_ref_vector< BV >::find_bv().
|
inline |
reset the collection (resize(0))
Definition at line 641 of file bmxor.h.
References bm::bv_ref_vector< BV >::ref_bvects_, bm::bv_ref_vector< BV >::ref_bvects_rows_, and bm::bv_ref_vector< BV >::rows_acc_.
Referenced by bm::bv_ref_vector< BV >::build().
|
inline |
Utility function to resize matrix based on number of vectors and blocks.
Definition at line 746 of file bmxor.h.
References bm::bv_ref_vector< BV >::ref_bvects_.
Referenced by bm::bv_ref_vector< BV >::build_nb_digest_and_xor_matrix().
|
inline |
Get reference list size.
Definition at line 660 of file bmxor.h.
References bm::bv_ref_vector< BV >::ref_bvects_.
Referenced by bm::xor_scanner< BV >::compute_sim_model(), bm::xor_scanner< BV >::deoptimize_gap_blocks(), bm::bv_ref_vector< BV >::fill_alloc_digest(), bm::bv_ref_vector< BV >::find(), bm::bv_ref_vector< BV >::find_bv(), bm::xor_scanner< BV >::search_best_xor_mask(), and bm::xor_scanner< BV >::sync_nb_vect().
|
protected |
reference vector pointers
Definition at line 776 of file bmxor.h.
Referenced by bm::bv_ref_vector< BV >::add(), bm::bv_ref_vector< BV >::fill_alloc_digest(), bm::bv_ref_vector< BV >::find_bv(), bm::bv_ref_vector< BV >::get_bv(), bm::bv_ref_vector< BV >::reset(), bm::bv_ref_vector< BV >::resize_xor_matrix(), and bm::bv_ref_vector< BV >::size().
|
protected |
reference vector row idxs
Definition at line 777 of file bmxor.h.
Referenced by bm::bv_ref_vector< BV >::add(), bm::bv_ref_vector< BV >::find(), bm::bv_ref_vector< BV >::get_row_idx(), and bm::bv_ref_vector< BV >::reset().
|
protected |
total rows accumulator
Definition at line 775 of file bmxor.h.
Referenced by bm::bv_ref_vector< BV >::add_vectors(), and bm::bv_ref_vector< BV >::reset().