LIBML  Version 3.2.4
LIBML DSP Software Library
Functions
Boolean Distances
Collaboration diagram for Boolean Distances:

Functions

f32_t tpt_hamming_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Hamming distance between two vectors. More...
 
f32_t tpt_jaccard_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Jaccard distance between two vectors. More...
 
f32_t tpt_kulsinski_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Kulsinski distance between two vectors. More...
 
f32_t tpt_rogerstanimoto_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Rogers Tanimoto distance between two vectors. More...
 
f32_t tpt_russellrao_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Russell-Rao distance between two vectors. More...
 
f32_t tpt_sokalmichener_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Sokal-Michener distance between two vectors. More...
 
f32_t tpt_sokalsneath_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Sokal-Sneath distance between two vectors. More...
 
f32_t tpt_yule_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Yule distance between two vectors. More...
 
f32_t tpt_dice_distance (const uint32_t *aInDataA, const uint32_t *aInDataB, uint32_t aNumberOfBools)
 Dice distance between two vectors. More...
 

Detailed 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

◆ tpt_dice_distance()

f32_t tpt_dice_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Dice distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_hamming_distance()

f32_t tpt_hamming_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Hamming distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_jaccard_distance()

f32_t tpt_jaccard_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Jaccard distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_kulsinski_distance()

f32_t tpt_kulsinski_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Kulsinski distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_rogerstanimoto_distance()

f32_t tpt_rogerstanimoto_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Rogers Tanimoto distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_russellrao_distance()

f32_t tpt_russellrao_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Russell-Rao distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_sokalmichener_distance()

f32_t tpt_sokalmichener_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Sokal-Michener distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_sokalsneath_distance()

f32_t tpt_sokalsneath_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Sokal-Sneath distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance

◆ tpt_yule_distance()

f32_t tpt_yule_distance ( const uint32_t *  aInDataA,
const uint32_t *  aInDataB,
uint32_t  aNumberOfBools 
)

Yule distance between two vectors.

Parameters
[in]aInDataAFirst vector of packed booleans
[in]aInDataBSecond vector of packed booleans
[in]aNumberOfBoolsNumber of booleans
Returns
distance