Classes | |
| class | bvector |
| bitvector with runtime compression of bits. More... | |
| struct | distance_metric_descriptor |
| Distance metric descriptor, holds metric code and result. More... | |
| class | block_allocator |
| Default malloc based bitblock allocator class. More... | |
| class | ptr_allocator |
| Default malloc based bitblock allocator class. More... | |
| class | mem_alloc |
| BM style allocator adapter. More... | |
| class | blocks_manager |
| bitvector blocks manager Embedded class managing bit-blocks on very low level. Includes number of functor classes used in different bitset algorithms. More... | |
| class | bit_block_guard |
| Bit block buffer guard. More... | |
| struct | bv_statistics |
| Structure with statistical information about bitset's memory allocation details. More... | |
| struct | gap_len_table |
| Default GAP lengths table. More... | |
| struct | gap_len_table_min |
| Alternative GAP lengths table. Good for for memory saver mode and very sparse bitsets. More... | |
| struct | bit_count_table |
| Structure to aid in counting bits table contains count of bits in 0-255 diapason of numbers. More... | |
| struct | block_set_table |
| Structure keeps all-left/right ON bits masks. More... | |
| struct | first_bit_table |
| Structure keeps index of first ON bit for every byte. More... | |
| struct | all_set |
| Structure carries pointer on bit block with all bits 1. More... | |
| struct | _copyright |
| Internal structure. More... | |
| struct | globals |
| Internal structure. More... | |
| class | bitblock_get_adapter |
| Bit-block get adapter, takes bitblock and represents it as a get_32() accessor function /internal. More... | |
| class | bitblock_store_adapter |
| Bit-block store adapter, takes bitblock and saves results into it /internal. More... | |
| class | bitblock_sum_adapter |
| Bit-block sum adapter, takes values and sums it /internal. More... | |
| class | decoder_range_adapter |
| Adapter to get words from a range stream (see range serialized bit-block). More... | |
| struct | bit_AND |
| Bit AND functor. More... | |
| struct | bit_OR |
| Bit OR functor. More... | |
| struct | bit_SUB |
| Bit SUB functor. More... | |
| struct | bit_XOR |
| Bit XOR functor. More... | |
| struct | bit_ASSIGN |
| Bit ASSIGN functor. More... | |
| struct | bit_COUNT |
| Bit COUNT functor. More... | |
| struct | bit_COUNT_AND |
| Bit COUNT AND functor. More... | |
| struct | bit_COUNT_XOR |
| Bit COUNT XOR functor. More... | |
| struct | bit_COUNT_OR |
| Bit COUNT OR functor. More... | |
| struct | bit_COUNT_SUB_AB |
| Bit COUNT SUB AB functor. More... | |
| struct | bit_COUNT_SUB_BA |
| Bit SUB BA functor. More... | |
| struct | bit_COUNT_A |
| Bit COUNT A functor. More... | |
| struct | bit_COUNT_B |
| Bit COUNT B functor. More... | |
| struct | operation_functions |
| class | serial_stream_iterator |
| Serialization stream iterator. More... | |
| class | operation_deserializer |
| Class deserializer, can perform logical operation on bit-vector and serialized bit-vector. More... | |
| class | iterator_deserializer |
| Iterator to walk forward the serialized stream. More... | |
| class | deserializer |
| Class deserializer. More... | |
| class | sse2_empty_guard |
| SSE2 reinitialization guard class. More... | |
| class | miniset |
| Template class implements memory saving set functionality. More... | |
| class | bvmini |
| Mini bitvector used in bvector template to keep block type flags. More... | |
| class | bvector_mini |
| Bitvector class with very limited functionality. More... | |
| class | encoder |
| Memory encoding. More... | |
| class | decoder_base |
| Base class for all decoding functionality. More... | |
| class | decoder |
| Class for decoding data from memory buffer. More... | |
| class | decoder_little_endian |
| Class for decoding data from memory buffer. More... | |
Typedefs | |
| typedef bm::miniset< bm::block_allocator, bm::set_total_blocks > | mem_save_set |
| typedef mem_alloc< block_allocator, ptr_allocator > | standard_allocator |
| typedef unsigned long long | id64_t |
| typedef unsigned int | id_t |
| typedef unsigned int | word_t |
| typedef unsigned short | short_t |
| typedef unsigned short | gap_word_t |
| typedef word_t | wordop_t |
| typedef void(* | gap_operation_to_bitset_func_type )(unsigned *, const gap_word_t *) |
| typedef gap_word_t *(* | gap_operation_func_type )(const gap_word_t *, const gap_word_t *, gap_word_t *) |
| typedef bm::id_t(* | bit_operation_count_func_type )(const bm::word_t *, const bm::word_t *, const bm::word_t *) |
| typedef bm::bvmini< bm::set_total_blocks > | standard_miniset |
| typedef mem_alloc< block_allocator, ptr_allocator > | standard_allocator |
| typedef decoder | decoder_big_endian |
| Class for decoding data from memory buffer. | |
Enumerations | |
| enum | distance_metric { COUNT_AND = set_COUNT_AND, COUNT_XOR = set_COUNT_XOR, COUNT_OR = set_COUNT_OR, COUNT_SUB_AB = set_COUNT_SUB_AB, COUNT_SUB_BA = set_COUNT_SUB_BA, COUNT_A = set_COUNT_A, COUNT_B = set_COUNT_B } |
| Distance metrics codes defined for vectors A and B. More... | |
| enum | strategy { BM_BIT = 0, BM_GAP = 1 } |
| Block allocation strategies. More... | |
| enum | set_operation { set_AND = 0, set_OR = 1, set_SUB = 2, set_XOR = 3, set_ASSIGN = 4, set_COUNT = 5, set_COUNT_AND = 6, set_COUNT_XOR = 7, set_COUNT_OR = 8, set_COUNT_SUB_AB = 9, set_COUNT_SUB_BA = 10, set_COUNT_A = 11, set_COUNT_B = 12, set_END } |
| Nomenclature of set operations. More... | |
| enum | operation { BM_AND = set_AND, BM_OR = set_OR, BM_SUB = set_SUB, BM_XOR = set_XOR } |
| Bit operations enumeration. More... | |
| enum | ByteOrder { BigEndian = 0, LittleEndian = 1 } |
| Byte orders recognized by the library. More... | |
| enum | serialization_header_mask { BM_HM_DEFAULT = 1, BM_HM_RESIZE = (1 << 1), BM_HM_ID_LIST = (1 << 2), BM_HM_NO_BO = (1 << 3), BM_HM_NO_GAPL = (1 << 4) } |
| enum | serialization_flags { BM_NO_BYTE_ORDER = 1, BM_NO_GAP_LENGTH = (1 << 1) } |
| Bit mask flags for serialization algorithm. More... | |
Functions | |
| template<class Alloc, class MS> | |
| bvector< Alloc, MS > | operator & (const bvector< Alloc, MS > &v1, const bvector< Alloc, MS > &v2) |
| template<class Alloc, class MS> | |
| bvector< Alloc, MS > | operator| (const bvector< Alloc, MS > &v1, const bvector< Alloc > &v2) |
| template<class Alloc, class MS> | |
| bvector< Alloc, MS > | operator^ (const bvector< Alloc, MS > &v1, const bvector< Alloc, MS > &v2) |
| template<class Alloc, class MS> | |
| bvector< Alloc, MS > | operator- (const bvector< Alloc, MS > &v1, const bvector< Alloc, MS > &v2) |
| distance_metric | operation2metric (set_operation op) |
| Convert set operation into compatible distance metric. | |
| void | combine_count_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, int arg_gap, bm::word_t *temp_blk, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) |
| Internal function computes different distance metrics. | |
| void | combine_any_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, int arg_gap, bm::word_t *temp_blk, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) |
| Internal function computes different existense of distance metric. | |
| unsigned | combine_count_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, int arg_gap, bm::word_t *temp_blk, distance_metric metric) |
| unsigned | combine_any_operation_with_block (const bm::word_t *blk, unsigned gap, const bm::word_t *arg_blk, int arg_gap, bm::word_t *temp_blk, distance_metric metric) |
| template<class BV> | |
| void | distance_operation (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) |
| Distance computing template function. | |
| template<class BV> | |
| void | distance_operation_any (const BV &bv1, const BV &bv2, distance_metric_descriptor *dmit, distance_metric_descriptor *dmit_end) |
| Distance screening template function. | |
| template<class BV> | |
| bm::id_t | count_and (const BV &bv1, const BV &bv2) |
| Computes bitcount of AND operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | any_and (const BV &bv1, const BV &bv2) |
| Computes if there is any bit in AND operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | count_xor (const BV &bv1, const BV &bv2) |
| Computes bitcount of XOR operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | any_xor (const BV &bv1, const BV &bv2) |
| Computes if there is any bit in XOR operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | count_sub (const BV &bv1, const BV &bv2) |
| Computes bitcount of SUB operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | any_sub (const BV &bv1, const BV &bv2) |
| Computes if there is any bit in SUB operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | count_or (const BV &bv1, const BV &bv2) |
| Computes bitcount of OR operation of two bitsets. | |
| template<class BV> | |
| bm::id_t | any_or (const BV &bv1, const BV &bv2) |
| Computes if there is any bit in OR operation of two bitsets. | |
| template<class It> | |
| It | block_range_scan (It first, It last, unsigned nblock, unsigned *max_id) |
| Internal algorithms scans the input for the block range limit. | |
| template<class BV, class It> | |
| void | combine_or (BV &bv, It first, It last) |
| OR Combine bitvector and the iterable sequence. | |
| template<class BV, class It> | |
| void | combine_xor (BV &bv, It first, It last) |
| XOR Combine bitvector and the iterable sequence. | |
| template<class BV, class It> | |
| void | combine_sub (BV &bv, It first, It last) |
| SUB Combine bitvector and the iterable sequence. | |
| template<class BV, class It> | |
| void | combine_and_sorted (BV &bv, It first, It last) |
| AND Combine bitvector and the iterable sequence. | |
| template<class BV, class It> | |
| void | combine_and (BV &bv, It first, It last) |
| AND Combine bitvector and the iterable sequence. | |
| template<class BV> | |
| bm::id_t | count_intervals (const BV &bv) |
| Compute number of bit intervals (GAPs) in the bitvector. | |
| template<class BV, class It> | |
| void | export_array (BV &bv, It first, It last) |
| Export bitset from an array of binary data representing the bit vector. | |
| BMFORCEINLINE bm::id_t | word_bitcount (bm::id_t w) |
| bool | is_const_set_operation (set_operation op) |
| Returns true if set operation is constant (bitcount). | |
| bm::operation | setop2op (bm::set_operation op) |
| Convert set operation to operation. | |
| template<typename W> | |
| void | xor_swap (W &x, W &y) |
| XOR swap two scalar variables. | |
| template<typename T> | |
| int | wordcmp0 (T w1, T w2) |
| Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes. | |
| template<typename T> | |
| int | wordcmp (T a, T b) |
| Lexicographical comparison of two words as bit strings. Auxiliary implementation for testing and reference purposes. | |
| template<typename T> | |
| unsigned | gap_bfind (const T *buf, unsigned pos, unsigned *is_set) |
| template<typename T> | |
| unsigned | gap_test (const T *buf, unsigned pos) |
| Tests if bit = pos is true. | |
| template<class T, class F> | |
| void | for_each_nzblock (T ***root, unsigned size1, unsigned size2, F &f) |
| template<class T, class F> | |
| bool | for_each_nzblock_if (T ***root, unsigned size1, unsigned size2, F &f) |
| template<class T, class F> | |
| void | for_each_block (T ***root, unsigned size1, unsigned size2, F &f) |
| template<class T, class F> | |
| F | bmfor_each (T first, T last, F f) |
| template<class T> | |
| T | sum_arr (T *first, T *last) |
| template<typename T> | |
| unsigned | gap_bit_count (const T *buf) |
| Calculates number of bits ON in GAP buffer. | |
| template<typename T> | |
| unsigned | gap_bit_count_range (const T *buf, T left, T right) |
| Counts 1 bits in GAP buffer in the closed [left, right] diapason. | |
| template<typename T> | |
| int | gapcmp (const T *buf1, const T *buf2) |
| Lexicographical comparison of GAP buffers. | |
| template<typename T, class F> | |
| void | gap_buff_op (T *BMRESTRICT dest, const T *BMRESTRICT vect1, unsigned vect1_mask, const T *BMRESTRICT vect2, unsigned vect2_mask, F f) |
| Abstract operation for GAP buffers. Receives functor F as a template argument. | |
| template<typename T, class F> | |
| unsigned | gap_buff_any_op (const T *BMRESTRICT vect1, unsigned vect1_mask, const T *BMRESTRICT vect2, unsigned vect2_mask, F f) |
| Abstract distance test operation for GAP buffers. Receives functor F as a template argument. | |
| template<typename T> | |
| unsigned | gap_set_value (unsigned val, T *BMRESTRICT buf, unsigned pos, unsigned *BMRESTRICT is_set) |
| Abstract distance(similarity) operation for GAP buffers. Receives functor F as a template argument Sets or clears bit in the GAP buffer. | |
| template<typename T> | |
| int | gap_find_in_block (const T *buf, unsigned nbit, bm::id_t *prev) |
| Searches for the next 1 bit in the GAP block. | |
| void | or_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
| Sets bits to 1 in the bitblock. | |
| void | sub_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
| SUB (AND NOT) bit interval to 1 in the bitblock. | |
| void | xor_bit_block (unsigned *dest, unsigned bitpos, unsigned bitcount) |
| XOR bit interval to 1 in the bitblock. | |
| template<typename T> | |
| void | gap_sub_to_bitset (unsigned *dest, const T *buf) |
| SUB (AND NOT) GAP block to bitblock. | |
| template<typename T> | |
| void | gap_xor_to_bitset (unsigned *dest, const T *buf) |
| XOR GAP block to bitblock. | |
| template<typename T> | |
| void | gap_add_to_bitset (unsigned *dest, const T *buf) |
| Adds(OR) GAP block to bitblock. | |
| template<typename T> | |
| void | gap_and_to_bitset (unsigned *dest, const T *buf) |
| ANDs GAP block to bitblock. | |
| template<typename T> | |
| bm::id_t | gap_bitset_and_count (const unsigned *block, const T *buf) |
| Compute bitcount of bit block AND masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_and_any (const unsigned *block, const T *buf) |
| Bitcount test of bit block AND masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_sub_count (const unsigned *block, const T *buf) |
| Compute bitcount of bit block SUB masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_sub_any (const unsigned *block, const T *buf) |
| Compute bitcount test of bit block SUB masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_xor_count (const unsigned *block, const T *buf) |
| Compute bitcount of bit block XOR masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_xor_any (const unsigned *block, const T *buf) |
| Compute bitcount test of bit block XOR masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_or_count (const unsigned *block, const T *buf) |
| Compute bitcount of bit block OR masked by GAP block. | |
| template<typename T> | |
| bm::id_t | gap_bitset_or_any (const unsigned *block, const T *buf) |
| Compute bitcount test of bit block OR masked by GAP block. | |
| void | bit_block_set (bm::word_t *BMRESTRICT dst, bm::word_t value) |
| Bitblock memset operation. | |
| template<typename T> | |
| void | gap_convert_to_bitset (unsigned *dest, const T *buf) |
| GAP block to bitblock conversion. | |
| template<typename T> | |
| void | gap_convert_to_bitset (unsigned *dest, const T *buf, unsigned dest_len) |
| GAP block to bitblock conversion. | |
| template<typename T> | |
| unsigned * | gap_convert_to_bitset_smart (unsigned *dest, const T *buf, id_t set_max) |
| Smart GAP block to bitblock conversion. | |
| template<typename T> | |
| unsigned | gap_control_sum (const T *buf) |
| Calculates sum of all words in GAP block. (For debugging purposes). | |
| template<class T> | |
| void | gap_set_all (T *buf, unsigned set_max, unsigned value) |
| Sets all bits to 0 or 1 (GAP). | |
| template<class T> | |
| void | gap_init_range_block (T *buf, unsigned from, unsigned to, unsigned value, unsigned set_max) |
| Init gap block so it has block in it (can be whole block). | |
| template<typename T> | |
| void | gap_invert (T *buf) |
| Inverts all bits in the GAP buffer. | |
| template<typename T> | |
| bool | gap_is_all_zero (const T *buf, unsigned set_max) |
| Temporary inverts all bits in the GAP buffer.Checks if GAP block is all-zero. | |
| template<typename T> | |
| bool | gap_is_all_one (const T *buf, unsigned set_max) |
| Checks if GAP block is all-one. | |
| template<typename T> | |
| unsigned | gap_length (const T *buf) |
| Returs GAP block length. | |
| template<typename T> | |
| unsigned | gap_capacity (const T *buf, const T *glevel_len) |
| Returs GAP block capacity. | |
| template<typename T> | |
| unsigned | gap_limit (const T *buf, const T *glevel_len) |
| Returs GAP block capacity limit. | |
| template<typename T> | |
| unsigned | gap_level (const T *buf) |
| Returs GAP blocks capacity level. | |
| template<typename T> | |
| void | set_gap_level (T *buf, unsigned level) |
| Sets GAP block capacity level. | |
| template<typename T> | |
| int | gap_calc_level (int len, const T *glevel_len) |
| Calculates GAP block capacity level. | |
| template<typename T> | |
| unsigned | gap_free_elements (const T *buf, const T *glevel_len) |
| Returns number of free elements in GAP block array. Difference between GAP block capacity on this level and actual GAP length. | |
| template<typename T> | |
| int | bitcmp (const T *buf1, const T *buf2, unsigned len) |
| Lexicographical comparison of BIT buffers. | |
| template<typename T> | |
| unsigned | bit_convert_to_gap (T *BMRESTRICT dest, const unsigned *BMRESTRICT src, bm::id_t bits, unsigned dest_len) |
| Converts bit block to GAP. | |
| template<typename D, typename T> | |
| D | gap_convert_to_arr (D *BMRESTRICT dest, const T *BMRESTRICT buf, unsigned dest_len) |
| Convert gap block into array of ints corresponding to 1 bits. | |
| template<typename T> | |
| T | bit_convert_to_arr (T *BMRESTRICT dest, const unsigned *BMRESTRICT src, bm::id_t bits, unsigned dest_len) |
| Convert bit block into an array of ints corresponding to 1 bits. | |
| bm::id_t | bit_block_calc_count (const bm::word_t *block, const bm::word_t *block_end) |
| Bitcount for bit string. | |
| bm::id_t | bit_count_change (bm::word_t w) |
| bm::id_t | bit_block_calc_count_change (const bm::word_t *block, const bm::word_t *block_end) |
| bm::id_t | bit_block_calc_count_range (const bm::word_t *block, bm::word_t left, bm::word_t right) |
| bm::id_t | bit_block_any_range (const bm::word_t *block, bm::word_t left, bm::word_t right) |
| template<typename T> | |
| void | bit_invert (T *start, T *end) |
| bool | is_bits_one (const bm::wordop_t *start, const bm::wordop_t *end) |
| Returns "true" if all bits in the block are 1. | |
| bool | bit_is_all_zero (const bm::wordop_t *start, const bm::wordop_t *end) |
| Returns "true" if all bits in the block are 0. | |
| unsigned | and_op (unsigned v1, unsigned v2) |
| GAP and functor. | |
| unsigned | xor_op (unsigned v1, unsigned v2) |
| GAP xor functor. | |
| gap_word_t * | gap_operation_and (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf) |
| GAP AND operation. | |
| unsigned | gap_operation_any_and (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2) |
| GAP AND operation test. | |
| gap_word_t * | gap_operation_xor (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf) |
| GAP XOR operation. | |
| unsigned | gap_operation_any_xor (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2) |
| GAP XOR operation test. | |
| gap_word_t * | gap_operation_or (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf) |
| GAP OR operation. | |
| gap_word_t * | gap_operation_sub (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2, gap_word_t *BMRESTRICT tmp_buf) |
| GAP SUB (AND NOT) operation. | |
| unsigned | gap_operation_any_sub (const gap_word_t *BMRESTRICT vect1, const gap_word_t *BMRESTRICT vect2) |
| GAP SUB operation test. | |
| void | bit_block_copy (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Bitblock copy operation. | |
| void | bit_block_and (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Plain bitblock AND operation. Function does not analyse availability of source and destination blocks. | |
| unsigned | bit_block_and_count (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2) |
| Function ANDs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_and_any (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2) |
| Function ANDs two bitblocks and tests for any bit. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_xor_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Function XORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_xor_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Function XORs two bitblocks and and tests for any bit. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_sub_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Function SUBs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_sub_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Function SUBs two bitblocks and and tests for any bit. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_or_count (const bm::word_t *src1, const bm::word_t *src1_end, const bm::word_t *src2) |
| Function ORs two bitblocks and computes the bitcount. Function does not analyse availability of source blocks. | |
| unsigned | bit_block_or_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Function ORs two bitblocks and and tests for any bit. Function does not analyse availability of source blocks. | |
| bm::word_t * | bit_operation_and (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| bitblock AND operation. | |
| bm::id_t | bit_operation_and_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock AND operation and calculates bitcount of the result. | |
| bm::id_t | bit_operation_and_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock AND operation test. | |
| bm::id_t | bit_operation_sub_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock SUB operation and calculates bitcount of the result. | |
| bm::id_t | bit_operation_sub_count_inv (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs inverted bitblock SUB operation and calculates bitcount of the result. | |
| bm::id_t | bit_operation_sub_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock test of SUB operation. | |
| bm::id_t | bit_operation_or_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock OR operation and calculates bitcount of the result. | |
| bm::id_t | bit_operation_or_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock OR operation test. | |
| void | bit_block_or (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Plain bitblock OR operation. Function does not analyse availability of source and destination blocks. | |
| bm::word_t * | bit_operation_or (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Block OR operation. Makes analysis if block is 0 or FULL. | |
| void | bit_block_sub (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Plain bitblock SUB (AND NOT) operation. Function does not analyse availability of source and destination blocks. | |
| bm::word_t * | bit_operation_sub (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| bitblock SUB operation. | |
| void | bit_block_xor (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| Plain bitblock XOR operation. Function does not analyse availability of source and destination blocks. | |
| bm::word_t * | bit_operation_xor (bm::word_t *BMRESTRICT dst, const bm::word_t *BMRESTRICT src) |
| bitblock XOR operation. | |
| bm::id_t | bit_operation_xor_count (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock XOR operation and calculates bitcount of the result. | |
| bm::id_t | bit_operation_xor_any (const bm::word_t *BMRESTRICT src1, const bm::word_t *BMRESTRICT src1_end, const bm::word_t *BMRESTRICT src2) |
| Performs bitblock XOR operation test. | |
| void | bit_find_head_tail (const bm::word_t *data, unsigned *head_idx, unsigned *tail_idx) |
| Inspects bit block for zero words at the head and at the end. | |
| int | bit_find_in_block (const bm::word_t *data, unsigned nbit, bm::id_t *prev) |
| Searches for the next 1 bit in the BIT block. | |
| template<typename T, typename B> | |
| unsigned | bit_list (T w, B *bits) |
| Unpacks word into list of ON bit indexes. | |
| template<typename T> | |
| unsigned | gap_overhead (const T *length, const T *length_end, const T *glevel_len) |
| Calculates memory overhead for number of gap blocks sharing the same memory allocation table (level lengths table). | |
| template<typename T> | |
| bool | improve_gap_levels (const T *length, const T *length_end, T *glevel_len) |
| Finds optimal gap blocks lengths. | |
| template<class It1, class It2, class BinaryOp, class Encoder> | |
| void | bit_recomb (It1 &it1, It2 &it2, BinaryOp &op, Encoder &enc, unsigned block_size=bm::set_block_size) |
| template<class BV> | |
| unsigned | serialize (const BV &bv, unsigned char *buf, bm::word_t *temp_block, unsigned serialization_flags=0) |
| Saves bitvector into memory. | |
| template<class BV> | |
| unsigned | serialize (BV &bv, unsigned char *buf, unsigned serialization_flags=0) |
| Saves bitvector into memory. Allocates temporary memory block for bvector. | |
| template<class BV> | |
| unsigned | deserialize (BV &bv, const unsigned char *buf, bm::word_t *temp_block=0) |
| Bitvector deserialization from memory. | |
| void | sse2_xor_arr_2_mask (__m128i *dst, const __m128i *src, const __m128i *src_end, bm::word_t mask) |
| XOR array elements to specified mask dst = *src ^ mask. | |
| void | sse2_andnot_arr_2_mask (__m128i *dst, const __m128i *src, const __m128i *src_end, bm::word_t mask) |
| Inverts array elements and NOT them to specified mask dst = ~*src & mask. | |
| void | sse2_and_arr (__m128i *dst, const __m128i *src, const __m128i *src_end) |
| AND array elements against another array dst &= *src. | |
| void | sse2_or_arr (__m128i *dst, const __m128i *src, const __m128i *src_end) |
| OR array elements against another array dst |= *src. | |
| void | sse2_xor_arr (__m128i *dst, const __m128i *src, const __m128i *src_end) |
| OR array elements against another array dst |= *src. | |
| void | sse2_sub_arr (__m128i *dst, const __m128i *src, const __m128i *src_end) |
| AND-NOT (SUB) array elements against another array dst &= ~*src. | |
| void | sse2_set_block (__m128i *dst, __m128i *dst_end, bm::word_t value) |
| SSE2 block memset dst = value. | |
| void | sse2_copy_block (__m128i *dst, const __m128i *src, const __m128i *src_end) |
| SSE2 block copy dst = *src. | |
| void | sse2_invert_arr (bm::word_t *first, bm::word_t *last) |
| Invert array elements dst = ~*dst or dst ^= *dst. | |
| bm::id_t | sse2_bit_count (const __m128i *block, const __m128i *block_end) |
| __m128i | sse2_and (__m128i a, __m128i b) |
| __m128i | sse2_or (__m128i a, __m128i b) |
| __m128i | sse2_xor (__m128i a, __m128i b) |
| __m128i | sse2_sub (__m128i a, __m128i b) |
| template<class Func> | |
| bm::id_t | sse2_bit_count_op (const __m128i *block, const __m128i *block_end, const __m128i *mask_block, Func sse2_func) |
Variables | |
| const unsigned | id_max = 0xFFFFFFFF |
| const unsigned | set_block_size = 2048u |
| const unsigned | set_block_shift = 16u |
| const unsigned | set_block_mask = 0xFFFFu |
| const unsigned | set_blkblk_mask = 0xFFFFFFu |
| const unsigned | set_word_shift = 5u |
| const unsigned | set_word_mask = 0x1Fu |
| const unsigned | gap_max_buff_len = 1280 |
| const unsigned | gap_max_bits = 65536 |
| const unsigned | gap_equiv_len |
| const unsigned | gap_levels = 4 |
| const unsigned | gap_max_level = bm::gap_levels - 1 |
| const unsigned | set_array_size = 256u |
| const unsigned | set_array_shift = 8u |
| const unsigned | set_array_mask = 0xFFu |
| const unsigned | set_total_blocks = (bm::set_array_size * bm::set_array_size) |
| const unsigned | bits_in_block = bm::set_block_size * sizeof(bm::word_t) * 8 |
| const unsigned | bits_in_array = bm::bits_in_block * bm::set_array_size |
| const word_t | all_bits_mask = 0xffffffff |
| const unsigned | set_block_size_op = bm::set_block_size |
|
|
|
|
|
Class for decoding data from memory buffer. Properly handles aligment issues with integer data types. Converts data to big endian architecture (presumed it was encoded as little endian) Definition at line 104 of file encoding.h. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Byte orders recognized by the library.
|
|
|
Bit operations enumeration.
|
|
|
Definition at line 119 of file bmserial.h. |
|
|
Nomenclature of set operations.
|
|
||||||||||||
|
GAP and functor.
Definition at line 2749 of file bmfunc.h. Referenced by gap_operation_and(), gap_operation_any_and(), gap_operation_any_sub(), gap_operation_or(), and gap_operation_sub(). |
|
||||||||||||||||||||||||||||
|
Abstract recombination algorithm for two bit-blocks Bit blocks can come as dserialization decoders or bit-streams Definition at line 4158 of file bmfunc.h. Referenced by bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_OR(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_SUB_AB(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_SUB_BA(), bm::serial_stream_iterator< DEC >::get_bit_block_COUNT_XOR(), bm::serial_stream_iterator< DEC >::get_bit_block_OR(), and TestRecomb(). |
|
||||||||||||||||||||||||
|
Internal algorithms scans the input for the block range limit.
Definition at line 1064 of file bmalgo_impl.h. References BM_ASSERT, id_max, and set_block_shift. Referenced by combine_or(), combine_sub(), and combine_xor(). |
|
||||||||||||||||||||
|
Special BM optimized analog of STL for_each Definition at line 629 of file bmfunc.h. References f(). |
|
||||||||||||||||||||||||||||
|
Convenience internal function to compute combine any for one metric Definition at line 635 of file bmalgo_impl.h. References combine_any_operation_with_block(), and bm::distance_metric_descriptor::result. |
|
||||||||||||||||||||||||||||||||
|
Internal function computes different existense of distance metric.
Definition at line 363 of file bmalgo_impl.h. References BMGAP_PTR, COUNT_A, COUNT_AND, COUNT_B, COUNT_OR, COUNT_SUB_AB, COUNT_SUB_BA, COUNT_XOR, gap_is_all_zero(), gap_max_bits, gap_max_buff_len, gap_operation_any_and(), gap_operation_any_sub(), gap_operation_any_xor(), and gap_operation_or(). Referenced by combine_any_operation_with_block(). |
|
||||||||||||||||||||||||||||
|
Convenience internal function to compute combine count for one metric Definition at line 613 of file bmalgo_impl.h. References combine_count_operation_with_block(), and bm::distance_metric_descriptor::result. |
|
||||||||||||||||||||||||||||||||
|
Internal function computes different distance metrics.
Definition at line 114 of file bmalgo_impl.h. References BMGAP_PTR, COUNT_A, COUNT_AND, COUNT_B, COUNT_OR, COUNT_SUB_AB, COUNT_SUB_BA, COUNT_XOR, gap_bit_count(), gap_max_buff_len, gap_operation_and(), gap_operation_or(), gap_operation_sub(), and gap_operation_xor(). Referenced by combine_count_operation_with_block(), and bm::bvector< Alloc, MS >::combine_count_operation_with_block(). |
|
||||||||||||||||||||||||
|
For each block executes supplied function. Definition at line 600 of file bmfunc.h. References f(). Referenced by count_intervals(), bm::bvector< Alloc, MS >::invert(), and bm::blocks_manager< Alloc, MS >::set_all_one(). |
|
||||||||||||||||||||||||
|
For each non-zero block executes supplied function. Definition at line 535 of file bmfunc.h. Referenced by bm::blocks_manager< Alloc, MS >::blocks_manager(), bm::bvector< Alloc, MS >::count(), bm::bvector< Alloc, MS >::count_blocks(), bm::blocks_manager< Alloc, MS >::deinit_tree(), bm::bvector< Alloc, MS >::optimize(), bm::blocks_manager< Alloc, MS >::set_all_zero(), and bm::bvector< Alloc, MS >::set_gap_levels(). |
|
||||||||||||||||||||||||
|
For each non-zero block executes supplied function-predicate. Function returns if function-predicate returns true Definition at line 575 of file bmfunc.h. References set_array_size. Referenced by bm::bvector< Alloc, MS >::any(). |
|
||||||||||||||||||||
|
Definition at line 469 of file bmfunc.h. References BM_ASSERT, and gap_max_bits. Referenced by gap_bit_count_range(), gap_find_in_block(), and gap_set_value(). |
|
||||||||||||||||||||
|
Counts 1 bits in GAP buffer in the closed [left, right] diapason.
Definition at line 691 of file bmfunc.h. References BM_ASSERT, and gap_bfind(). Referenced by gap_vector::count_range(), and bm::bvector< Alloc, MS >::count_range(). |
|
|
Returns true if set operation is constant (bitcount).
Definition at line 274 of file bmfunc.h. References set_COUNT. Referenced by operation2metric(). |
|
||||||||||||||||
|
Definition at line 1553 of file bm.h. References bm::bvector< Alloc, MS >::bit_and(). |
|
||||||||||||||||
|
Definition at line 1598 of file bm.h. References bm::bvector< Alloc, MS >::bit_sub(). |
|
||||||||||||||||
|
Definition at line 1583 of file bm.h. References bm::bvector< Alloc, MS >::bit_xor(). |
|
||||||||||||||||
|
Definition at line 1568 of file bm.h. References bm::bvector< Alloc, MS >::bit_or(). |
|
|
Convert set operation to operation.
Definition at line 294 of file bmfunc.h. References BM_ASSERT, set_AND, set_OR, set_SUB, and set_XOR. |
|
||||||||||||
|
|
|
||||||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
Computes SUM of all elements of the sequence |
|
||||||||||||
|
GAP xor functor.
Definition at line 2756 of file bmfunc.h. Referenced by gap_operation_any_xor(), and gap_operation_xor(). |
|
||||||||||||||||
|
XOR swap two scalar variables.
Definition at line 329 of file bmfunc.h. References BM_ASSERT. Referenced by bm::blocks_manager< Alloc, MS >::swap(), and bm::bvector< Alloc, MS >::swap(). |
|
|
Definition at line 99 of file bmconst.h. Referenced by bm::bvector< Alloc, MS >::combine_operation_with_block(), and is_bits_one(). |
|
|
Definition at line 84 of file bmconst.h. Referenced by bm::bvector< Alloc, MS >::enumerator::go_first(). |
|
|
|
Initial value: (sizeof(bm::word_t) * bm::set_block_size) / sizeof(gap_word_t) |
|
|
|
|
|
Definition at line 73 of file bmconst.h. Referenced by bm::blocks_manager< Alloc, MS >::extend_gap_block(), and bm::blocks_manager< Alloc, MS >::block_opt_func::operator()(). |
|
|
|
Definition at line 80 of file bmconst.h. Referenced by bm::blocks_manager< Alloc, MS >::get_block(), bm::blocks_manager< Alloc, MS >::get_block_coord(), bm::blocks_manager< Alloc, MS >::set_block(), and bm::blocks_manager< Alloc, MS >::set_block_ptr(). |
|
|
Definition at line 79 of file bmconst.h. Referenced by bm::blocks_manager< Alloc, MS >::get_block(), bm::blocks_manager< Alloc, MS >::get_block_coord(), bm::blocks_manager< Alloc, MS >::set_block(), and bm::blocks_manager< Alloc, MS >::set_block_ptr(). |
|
|
|
Definition at line 56 of file bmconst.h. Referenced by bm::bvector< Alloc, MS >::check_or_next(), and bm::bvector< Alloc, MS >::check_or_next_extract(). |
|
|
|
|
|
|
|
|
Definition at line 81 of file bmconst.h. Referenced by bm::bvector< Alloc, MS >::check_or_next(), bm::bvector< Alloc, MS >::check_or_next_extract(), CompareMiniSet(), export_array(), main(), MiniSetTest(), serialize(), and bm::bvector< Alloc, MS >::stat(). |
|
|
1.4.6
Modified on Mon Nov 09 15:48:51 2009 by modify_doxy.py rev. 173732