[][src]Function rulinalg::utils::vec_sub

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

Compute vector difference two slices.

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

assert_eq!(c, vec![0.0; 4]);