Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals | Examples

bmalgo.h File Reference

#include "bm.h"
#include "bmfunc.h"
#include "bmdef.h"
#include "bmundef.h"

Include dependency graph for bmalgo.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bm

Enumerations

enum  distance_metric {
  COUNT_AND, COUNT_XOR, COUNT_OR, COUNT_SUB_AB,
  COUNT_SUB_BA, COUNT_A, COUNT_B
}
 Distance metrics codes defined for vectors A and B. More...

Functions

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.
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>
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 count_xor (const BV &bv1, const BV &bv2)
 Computes bitcount of 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 count_or (const BV &bv1, const BV &bv2)
 Computes bitcount of 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 (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.


Function Documentation

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.

Definition at line 520 of file bmalgo.h.

References BM_ASSERT.

Referenced by bm::combine_or(), bm::combine_sub(), and bm::combine_xor().

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
[inline]
 

Internal function computes different distance metrics.

Definition at line 99 of file bmalgo.h.

References bm::bit_block_calc_count(), bm::bit_operation_and_count(), bm::bit_operation_or_count(), bm::bit_operation_sub_count(), bm::bit_operation_xor_count(), BMGAP_PTR, bm::gap_bit_count(), bm::gap_bitset_and_count(), bm::gap_bitset_or_count(), bm::gap_bitset_sub_count(), bm::gap_bitset_xor_count(), bm::gap_convert_to_bitset(), bm::gap_operation_and(), bm::gap_operation_or(), bm::gap_operation_sub(), bm::gap_operation_xor(), bm::distance_metric_descriptor::metric, and bm::distance_metric_descriptor::result.

Referenced by bm::distance_operation().


Generated on Thu Apr 20 13:29:00 2006 for BitMagic by  doxygen 1.4.1