pub fn dot<T: Copy + Zero + Add<T, Output = T> + Mul<T, Output = T>>(
    u: &[T],
    v: &[T]
) -> T
Expand description

Compute dot product of two slices.

Examples

use rulinalg::utils;
let a = vec![1.0, 2.0, 3.0, 4.0];
let b = vec![1.0, 2.0, 3.0, 4.0];

let c = utils::dot(&a,&b);