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

Functions

float16_t arm_cosine_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize)
 Cosine distance between two vectors. More...
 
float32_t arm_cosine_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize)
 Cosine distance between two vectors. More...
 
float64_t arm_cosine_distance_f64 (const float64_t *pA, const float64_t *pB, uint32_t blockSize)
 Cosine distance between two vectors. More...
 

Description

Cosine distance

Function Documentation

float16_t arm_cosine_distance_f16 ( const float16_t *  pA,
const float16_t *  pB,
uint32_t  blockSize 
)
Parameters
[in]pAFirst vector
[in]pBSecond vector
[in]blockSizevector length
Returns
distance
Description
cosine_distance(u,v) is 1 - u . v / (Norm(u) Norm(v))
float32_t arm_cosine_distance_f32 ( const float32_t pA,
const float32_t pB,
uint32_t  blockSize 
)
Parameters
[in]pAFirst vector
[in]pBSecond vector
[in]blockSizevector length
Returns
distance
Description
cosine_distance(u,v) is 1 - u . v / (Norm(u) Norm(v))
float64_t arm_cosine_distance_f64 ( const float64_t pA,
const float64_t pB,
uint32_t  blockSize 
)
Parameters
[in]pAFirst vector
[in]pBSecond vector
[in]blockSizevector length
Returns
distance