use na::{self, Real, DefaultAllocator}; use aliases::Vec; use traits::{Number, Alloc, Dimension}; 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 greater_than(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x > y) } pub fn greater_than_equal(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x >= y) } pub fn less_than(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x < y) } pub fn less_than_equal(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 not_equal(x: &Vec, y: &Vec) -> Vec where DefaultAllocator: Alloc { x.zip_map(y, |x, y| x != y) }