[][src]Function rulinalg::utils::ele_mul

pub fn ele_mul<T: Copy + Mul<T, Output = T>>(u: &[T], v: &[T]) -> Vec<T>

Computes elementwise multiplication.

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::ele_mul(&a,&b);

assert_eq!(c, vec![1.0, 4.0, 9.0, 16.0]);