pub trait Dot<Rhs> {
type Output;
fn dot(self, rhs: Rhs) -> Self::Output;
}
Returns the dot product of two vector arrays
u ⋅ v
rhs
- A vector of same length
let u = [1.0, 2.0, 3.0];
let v = [1.0, 2.0, 3.0];
let uv = 1.0 + 4.0 + 9.0;
assert_eq!(u.dot(v), uv);