Skip to main content

dot

Function dot 

Source
pub fn dot(a: &[f64], b: &[f64]) -> f64
Expand description

Euclidean inner product Σ_i a_i · b_i (dimensionless).

Both slices must have the same length; a mismatch panics via debug_assert. Valid for any finite inputs; returns 0.0 for empty slices.