use approx::AbsDiffEq; use num::{Bounded, FromPrimitive, Signed}; use na::allocator::Allocator; use na::{DimMin, DimName, Scalar, U1}; use simba::scalar::{ClosedAdd, ClosedMul, ClosedSub}; use std::cmp::PartialOrd; /// A type-level number representing a vector, matrix row, or matrix column, dimension. pub trait Dimension: DimName + DimMin {} impl> Dimension for D {} /// A number that can either be an integer or a float. pub trait Number: Scalar + Copy + PartialOrd + ClosedAdd + ClosedSub + ClosedMul + AbsDiffEq + Signed + FromPrimitive + Bounded { } impl< T: Scalar + Copy + PartialOrd + ClosedAdd + ClosedSub + ClosedMul + AbsDiffEq + Signed + FromPrimitive + Bounded, > Number for T { } #[doc(hidden)] pub trait Alloc: Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator<(usize, usize), R> + Allocator<(usize, usize), C> { } impl Alloc for T where T: Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator + Allocator<(usize, usize), R> + Allocator<(usize, usize), C> { }