fn inner_prod<T>(x: &[T], y: &[T]) -> T
where
    T: Num + NumCast + Copy + Default + AddAssign,
{
    let mut sum: T = cast_t2u(0.0);
    for ii in 0..x.len() {
        sum += x[ii] * y[ii];
    }
    cast_t2u(sum)
}
/// calculate the inner product of two arrays
calculate the inner product of two arrays
calculate the inner product of two arrays
fn inner_prod<T>(x: &[T], y: &[T]) -> T
where
    T: Num + NumCast + Copy + Default + AddAssign,
{
    let mut sum: T = cast_t2u(0.0);
    for ii in 0..x.len() {
        sum += x[ii] * y[ii];
    }
    cast_t2u(sum)
}
fn inner_prod < T > ( x : & [ T ] , y : & [ T ] ) -> T where T : Num + NumCast + Copy + Default + AddAssign , { let mut sum : T = cast_t2u ( 0.0 ) ; for ii in 0 .. x . len ( ) { sum += x [ ii ] * y [ ii ] ; } cast_t2u ( sum ) }
calculate the inner product of two arrays
calculate the inner product of two arrays
x
&[T]
y
&[T]
x
&[T]
y
&[T]