ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
flann::HammingLUT Struct Reference

#include <dist.h>

Public Types

typedef unsigned char ElementType
 
typedef int ResultType
 

Public Member Functions

ResultType operator() (const unsigned char *a, const unsigned char *b, int size) const
 

Static Public Member Functions

static unsigned char byteBitsLookUp (unsigned char b)
 given a byte, count the bits using a look up table More...
 

Detailed Description

Hamming distance functor - counts the bit differences between two strings - useful for the Brief descriptor bit count of A exclusive XOR'ed with B

Definition at line 372 of file dist.h.

Member Typedef Documentation

◆ ElementType

typedef unsigned char flann::HammingLUT::ElementType

Definition at line 374 of file dist.h.

◆ ResultType

Definition at line 375 of file dist.h.

Member Function Documentation

◆ byteBitsLookUp()

static unsigned char flann::HammingLUT::byteBitsLookUp ( unsigned char  b)
inlinestatic

given a byte, count the bits using a look up table

Parameters
bthe byte to count bits. The look up table has an entry for all values of b, where that entry is the number of bits.
Returns
the number of bits in byte b

Definition at line 394 of file dist.h.

Referenced by operator()().

◆ operator()()

ResultType flann::HammingLUT::operator() ( const unsigned char *  a,
const unsigned char *  b,
int  size 
) const
inline

this will count the bits in a ^ b

Definition at line 379 of file dist.h.

References byteBitsLookUp(), result, and size.


The documentation for this struct was generated from the following file: