BitMagic-C++
Data Structures | Namespaces | Enumerations | Functions
bmalgo_impl.h File Reference

Algorithms for bvector<> More...

#include "bmdef.h"
#include "bmutil.h"
Include dependency graph for bmalgo_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bm::distance_metric_descriptor
 Distance metric descriptor, holds metric code and result. More...
 

Namespaces

 bm
 

Enumerations

enum  bm::distance_metric {
  bm::COUNT_AND = set_COUNT_AND, bm::COUNT_XOR = set_COUNT_XOR, bm::COUNT_OR = set_COUNT_OR, bm::COUNT_SUB_AB = set_COUNT_SUB_AB,
  bm::COUNT_SUB_BA = set_COUNT_SUB_BA, bm::COUNT_A = set_COUNT_A, bm::COUNT_B = set_COUNT_B
}
 Distance metrics codes defined for vectors A and B. More...
 

Functions

distance_metric bm::operation2metric (set_operation op)
 Convert set operation into compatible distance metric. More...
 
void bm::combine_count_operation_with_block (const bm::word_t *blk, const bm::word_t *arg_blk, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)
 Internal function computes different distance metrics. More...
 
unsigned bm::combine_count_and_operation_with_block (const bm::word_t *blk, const bm::word_t *arg_blk)
 Internal function computes AND distance. More...
 
void bm::combine_any_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, unsigned arg_gap, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)
 Internal function computes different existense of distance metric. More...
 
unsigned bm::combine_count_operation_with_block (const bm::word_t *blk, const bm::word_t *arg_blk, distance_metric metric)
 
unsigned bm::combine_any_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, unsigned arg_gap, distance_metric metric)
 
void bm::distance_stage (const distance_metric_descriptor *dmit, const distance_metric_descriptor *dmit_end, bool *is_all_and)
 Staging function for distance operation. More...
 
template<class BV >
void bm::distance_operation (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)
 Distance computing template function. More...
 
template<class BV >
unsigned bm::distance_and_operation (const BV &bv1, const BV &bv2)
 Distance AND computing template function. More...
 
template<class BV >
void bm::distance_operation_any (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end)
 Distance screening template function. More...
 
template<class BV >
bm::id_t bm::count_and (const BV &bv1, const BV &bv2)
 Computes bitcount of AND operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::any_and (const BV &bv1, const BV &bv2)
 Computes if there is any bit in AND operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::count_xor (const BV &bv1, const BV &bv2)
 Computes bitcount of XOR operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::any_xor (const BV &bv1, const BV &bv2)
 Computes if there is any bit in XOR operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::count_sub (const BV &bv1, const BV &bv2)
 Computes bitcount of SUB operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::any_sub (const BV &bv1, const BV &bv2)
 Computes if there is any bit in SUB operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::count_or (const BV &bv1, const BV &bv2)
 Computes bitcount of OR operation of two bitsets. More...
 
template<class BV >
bm::id_t bm::any_or (const BV &bv1, const BV &bv2)
 Computes if there is any bit in OR operation of two bitsets. More...
 
template<class It >
It bm::block_range_scan (It first, It last, unsigned nblock, unsigned *max_id)
 Internal algorithms scans the input for the block range limit. More...
 
template<class BV , class It >
void bm::combine_or (BV &bv, It first, It last)
 OR Combine bitvector and the iterable sequence. More...
 
template<class BV , class It >
void bm::combine_xor (BV &bv, It first, It last)
 XOR Combine bitvector and the iterable sequence. More...
 
template<class BV , class It >
void bm::combine_sub (BV &bv, It first, It last)
 SUB Combine bitvector and the iterable sequence. More...
 
template<class BV , class It >
void bm::combine_and_sorted (BV &bv, It first, It last)
 AND Combine bitvector and the iterable sequence. More...
 
template<class BV , class It >
void bm::combine_and (BV &bv, It first, It last)
 AND Combine bitvector and the iterable sequence. More...
 
template<class BV >
bm::id_t bm::count_intervals (const BV &bv)
 Compute number of bit intervals (GAPs) in the bitvector. More...
 
template<typename BV , class It >
void bm::export_array (BV &bv, It first, It last)
 Export bitset from an array of binary data representing the bit vector. More...
 
template<class Func >
void bm::for_each_bit_blk (const bm::word_t *block, bm::id_t offset, Func &bit_functor)
 for-each visitor, calls a special visitor functor for each 1 bit group More...
 
template<typename T , typename Func >
void bm::for_each_gap_blk (const T *buf, bm::id_t offset, Func &bit_functor)
 for-each visitor, calls a special visitor functor for each 1 bit range More...
 

Detailed Description

Algorithms for bvector<>

Definition in file bmalgo_impl.h.