Skip to main content

ApproxEq

Trait ApproxEq 

Source
pub trait ApproxEq<U: LowerExp, T: LowerExp>: LowerExp {
    // Required method
    fn approx_eq(&self, other: &U, tolerance: &T) -> bool;

    // Provided methods
    fn approx_eq_slice(lhs: &[Self], rhs: &[U], tolerance: &T) -> bool
       where Self: Sized { ... }
    fn approx_eq_iterator<'a, I, J>(lhs: I, rhs: J, tolerance: &'a T) -> bool
       where Self: Sized + 'a,
             U: 'a,
             I: IntoIterator<Item = &'a Self>,
             J: IntoIterator<Item = &'a U> { ... }
    fn assert_approx_eq(&self, other: &U, tolerance: &T) { ... }
    fn approx_eq_res(&self, other: &U, tolerance: &T) -> Result<()> { ... }
}

Required Methods§

Source

fn approx_eq(&self, other: &U, tolerance: &T) -> bool

Provided Methods§

Source

fn approx_eq_slice(lhs: &[Self], rhs: &[U], tolerance: &T) -> bool
where Self: Sized,

Source

fn approx_eq_iterator<'a, I, J>(lhs: I, rhs: J, tolerance: &'a T) -> bool
where Self: Sized + 'a, U: 'a, I: IntoIterator<Item = &'a Self>, J: IntoIterator<Item = &'a U>,

Source

fn assert_approx_eq(&self, other: &U, tolerance: &T)

Source

fn approx_eq_res(&self, other: &U, tolerance: &T) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: FloatLike> ApproxEq<Complex<F<T>>, F<T>> for Complex<F<T>>

Source§

fn approx_eq(&self, other: &Complex<F<T>>, tolerance: &F<T>) -> bool

Source§

fn approx_eq_res(&self, other: &Complex<F<T>>, tolerance: &F<T>) -> Result<()>

Source§

impl<T: FloatLike> ApproxEq<F<T>, F<T>> for Complex<F<T>>

Source§

fn approx_eq(&self, other: &F<T>, tolerance: &F<T>) -> bool

Source§

fn approx_eq_res(&self, other: &F<T>, tolerance: &F<T>) -> Result<()>

Implementors§

Source§

impl<T: FloatLike> ApproxEq<Complex<F<T>>, F<T>> for F<T>

Source§

impl<T: FloatLike> ApproxEq<Energy<F<T>>, F<T>> for Energy<F<T>>

Source§

impl<T: FloatLike> ApproxEq<F<T>, F<T>> for F<T>

Source§

impl<T: FloatLike> ApproxEq<FourMomentum<F<T>>, F<T>> for FourMomentum<F<T>>

Source§

impl<T: FloatLike> ApproxEq<Polarization<Complex<F<T>>>, F<T>> for FourMomentum<F<T>>

Source§

impl<T: FloatLike> ApproxEq<Polarization<Complex<F<T>>>, F<T>> for Polarization<Complex<F<T>>>

Source§

impl<T: FloatLike> ApproxEq<ThreeMomentum<F<T>>, F<T>> for ThreeMomentum<F<T>>