Function dot
Source pub fn dot<T: Scalar>(a: &[T], b: &[T]) -> T
Expand description
Dot product of two vectors.
§Panics
Panics if a.len() != b.len().
§Examples
use tensor4all_tcicore::matrix::dot;
let a = [1.0_f64, 2.0, 3.0];
let b = [4.0, 5.0, 6.0];
assert!((dot(&a, &b) - 32.0).abs() < 1e-10);