[][src]Function cmsis_dsp_sys_pregenerated::arm_jensenshannon_distance_f32

pub unsafe extern "C" fn arm_jensenshannon_distance_f32(
    pA: *const float32_t,
    pB: *const float32_t,
    blockSize: u32
) -> float32_t

@brief Jensen-Shannon distance between two vectors

This function is assuming that elements of second vector are > 0 and 0 only when the corresponding element of first vector is 0. Otherwise the result of the computation does not make sense and for speed reasons, the cases returning NaN or Infinity are not managed.

When the function is computing x log (x / y) with x 0 and y 0, it will compute the right value (0) but a division per zero will occur and shoudl be ignored in client code.

@param[in] pA First vector @param[in] pB Second vector @param[in] blockSize vector length @return distance