NMSIS-DSP  Version 1.3.1
NMSIS DSP Software Library
Boolean Distances

Distances between two vectors of boolean values. More...

Functions

RISCV_DSP_ATTRIBUTE float32_t riscv_hamming_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Hamming distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_jaccard_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Jaccard distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_kulsinski_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Kulsinski distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_rogerstanimoto_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Rogers Tanimoto distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_russellrao_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Russell-Rao distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_sokalmichener_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Sokal-Michener distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_sokalsneath_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Sokal-Sneath distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_yule_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 Yule distance between two vectors. More...
 
RISCV_DSP_ATTRIBUTE float32_t riscv_dice_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
 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

◆ riscv_dice_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_dice_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Dice distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_hamming_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_hamming_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Hamming distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_jaccard_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_jaccard_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Jaccard distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_kulsinski_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_kulsinski_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Kulsinski distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_rogerstanimoto_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_rogerstanimoto_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Rogers Tanimoto distance between two vectors.

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

◆ riscv_russellrao_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_russellrao_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Russell-Rao distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_sokalmichener_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_sokalmichener_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Sokal-Michener distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_sokalsneath_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_sokalsneath_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Sokal-Sneath distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance

◆ riscv_yule_distance()

RISCV_DSP_ATTRIBUTE float32_t riscv_yule_distance ( const uint32_t *  pA,
const uint32_t *  pB,
uint32_t  numberOfBools 
)

Yule distance between two vectors.

Parameters
[in]pAFirst vector of packed booleans
[in]pBSecond vector of packed booleans
[in]numberOfBoolsNumber of booleans
Returns
distance