Skip to main content

dot

Function dot 

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

Dot product of two equal-length vectors (extra elements of the longer one are ignored, which never happens for the matched-length inputs used internally).

§Arguments

  • a, b — the vectors to multiply elementwise and sum.

§Returns

Σ aᵢ·bᵢ.