use na::{self, Real, DimName, DefaultAllocator}; use aliases::Vec; use traits::{Number, Alloc}; pub fn all(v: &Vec) -> bool where DefaultAllocator: Alloc { v.iter().all(|x| *x) } pub fn any(v: &Vec) -> bool where DefaultAllocator: Alloc { v.iter().any(|x| *x) } pub fn equal(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x == y) } pub fn greaterThan(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x > y) } pub fn greaterThanEqual(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x >= y) } pub fn lessThan(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x < y) } pub fn lessThanEqual(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x <= y) } pub fn not(v: &Vec) -> Vec where DefaultAllocator: Alloc { v.map(|x| !x) } pub fn notEqual(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x != y) }