CMSIS-DSP  
CMSIS DSP Software Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Boolean Distances

Functions

float32_t arm_hamming_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Hamming distance between two vectors. More...
 
float32_t arm_jaccard_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Jaccard distance between two vectors. More...
 
float32_t arm_kulsinski_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Kulsinski distance between two vectors. More...
 
float32_t arm_rogerstanimoto_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Rogers Tanimoto distance between two vectors. More...
 
float32_t arm_russellrao_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Russell-Rao distance between two vectors. More...
 
float32_t arm_sokalmichener_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Sokal-Michener distance between two vectors. More...
 
float32_t arm_sokalsneath_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Sokal-Sneath distance between two vectors. More...
 
float32_t arm_yule_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Yule distance between two vectors. More...
 
float32_t arm_dice_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Dice distance between two vectors. More...
 

Description

Distances between two vectors of boolean values.

Booleans are packed in 32 bit words. numberOfBooleans argument is the number of booleans and not the number of words.

Bits are packed in big-endian mode (because of behavior of numpy packbits in in version < 1.17)

Function Documentation

float32_t arm_dice_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_hamming_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_jaccard_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_kulsinski_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_rogerstanimoto_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Roger Stanimoto distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_russellrao_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_sokalmichener_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_sokalsneath_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance
float32_t arm_yule_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)
Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance