NCBI C++ ToolKit
Classes | 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.

Go to the SVN repository for this file.

Classes

struct  bm::distance_metric_descriptor
 Distance metric descriptor, holds metric code and result. More...
 
struct  bm::bit_visitor_callback_adaptor< VCBT, size_type >
 functor-adaptor for C-style callbacks More...
 
struct  bm::bit_visitor_back_inserter_adaptor< BII, size_type >
 functor-adaptor for back-inserter More...
 

Namespaces

 bm
 #include<zmmintrin.h>
 

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) noexcept
 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) noexcept
 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) noexcept
 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) noexcept
 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) noexcept
 
bm::distance_metric_descriptor::size_type 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) noexcept
 
void bm::distance_stage (const distance_metric_descriptor *dmit, const distance_metric_descriptor *dmit_end, bool *is_all_and) noexcept
 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) noexcept
 Distance computing template function. More...
 
template<class BV >
BV::size_type bm::distance_and_operation (const BV &bv1, const BV &bv2) noexcept
 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) noexcept
 Distance screening template function. More...
 
template<typename It , typename SIZE_TYPE >
It bm::block_range_scan (It first, It last, SIZE_TYPE nblock, SIZE_TYPE *max_id) noexcept
 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 >
BV::size_type 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<typename Func , typename SIZE_TYPE >
int bm::for_each_bit_blk (const bm::word_t *block, SIZE_TYPE offset, Func &bit_functor)
 for-each visitor, calls a visitor functor for each 1 bit group More...
 
template<typename Func , typename SIZE_TYPE >
int bm::for_each_bit_blk (const bm::word_t *block, SIZE_TYPE offset, unsigned left, unsigned right, Func &bit_functor)
 for-each range visitor, calls a visitor functor for each 1 bit group More...
 
template<typename T , typename Func , typename SIZE_TYPE >
int bm::for_each_gap_blk (const T *buf, SIZE_TYPE offset, Func &bit_functor)
 for-each visitor, calls a special visitor functor for each 1 bit range More...
 
template<typename T , typename Func , typename SIZE_TYPE >
int bm::for_each_gap_blk_range (const T *buf, SIZE_TYPE offset, unsigned left, unsigned right, Func &bit_functor)
 for-each visitor, calls a special visitor functor for each 1 bit range More...
 
template<typename T , typename N , typename F >
int bm::for_each_bit_block_range (T ***root, N top_size, N nb_from, N nb_to, F &f)
 
template<class BV , class Func >
int bm::for_each_bit_range_no_check (const BV &bv, typename BV::size_type left, typename BV::size_type right, Func &bit_functor)
 Implementation of for_each_bit_range without boilerplave checks. More...
 
template<typename BV , typename VECT >
void bm::convert_sub_to_arr (const BV &bv, unsigned sb, VECT &vect)
 convert sub-blocks to an array of set 1s (32-bit) More...
 

Detailed Description

Algorithms for bvector<>

Definition in file bmalgo_impl.h.

Modified on Fri Sep 20 14:57:01 2024 by modify_doxy.py rev. 669887