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

Functions

float16_t arm_canberra_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize)
 Canberra distance between two vectors. More...
 
float32_t arm_canberra_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize)
 Canberra distance between two vectors. More...
 

Description

Canberra distance

Function Documentation

float16_t arm_canberra_distance_f16 ( const float16_t *  pA,
const float16_t *  pB,
uint32_t  blockSize 
)

This function may divide by zero when samples pA[i] and pB[i] are both zero. The result of the computation will be correct. So the division per zero may be ignored.

Parameters
[in]pAFirst vector
[in]pBSecond vector
[in]blockSizevector length
Returns
distance
float32_t arm_canberra_distance_f32 ( const float32_t pA,
const float32_t pB,
uint32_t  blockSize 
)

This function may divide by zero when samples pA[i] and pB[i] are both zero. The result of the computation will be correct. So the division per zero may be ignored.

Parameters
[in]pAFirst vector
[in]pBSecond vector
[in]blockSizevector length
Returns
distance