[][src]Function lsh_rs::dist::inner_prod

pub fn inner_prod(a: &[f32], b: &[f32]) -> f32

Dot product between two vectors.

Panics

Panics if a.len() != b.len().

Examples

use lsh_rs::dist::inner_prod;
let a = vec![1., -1.];
let b = vec![0.2, 1.2];
let prod = inner_prod(&a, &b);