Trait array_matrix::vector::dot::Dot

source ·
pub trait Dot<Rhs: Vector>: Vector {
    type Output;

    fn dot(self, rhs: Rhs) -> Self::Output;
}

Required Associated Types§

Required Methods§

Returns the scalar dot product of two vector-arrays

u ⋅ v

Arguments
  • rhs - A vector of same length
Examples
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);

Implementations on Foreign Types§

Implementors§