[][src]Struct norman::desc::Abs

pub struct Abs {}

A norm that is defined by an absolute value function on a field.

This is used for implementing the norms on types which represent a mathematical field, like the primitive floating point types (representing the field of real numbers) or the num_complex::Complex types (representing the field of complex numbers).

It can be seen as the most primitive kind of norm.

It is the only kind of norm that is used for further generic implementations, i.e. there are impls of the form impl<T: Norm<Abs>> Norm<SomeNorm> for SomeType<T>.

Methods

impl Abs[src]

pub fn new() -> Self[src]

Creates an Abs norm.

Trait Implementations

impl Norm<Abs> for f32[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for f64[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for i8[src]

type Output = u8

The resulting type of the norm function. Read more

impl Norm<Abs> for i16[src]

type Output = u16

The resulting type of the norm function. Read more

impl Norm<Abs> for i32[src]

type Output = u32

The resulting type of the norm function. Read more

impl Norm<Abs> for i64[src]

type Output = u64

The resulting type of the norm function. Read more

impl Norm<Abs> for isize[src]

type Output = usize

The resulting type of the norm function. Read more

impl Norm<Abs> for u8[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for u16[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for u32[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for u64[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for usize[src]

type Output = Self

The resulting type of the norm function. Read more

impl Norm<Abs> for i128[src]

type Output = u128

The resulting type of the norm function. Read more

impl Norm<Abs> for u128[src]

type Output = Self

The resulting type of the norm function. Read more

impl<T: Float> Norm<Abs> for Complex<T>[src]

type Output = T

The resulting type of the norm function. Read more

fn norm(&self, _desc: Abs) -> T[src]

Calculates the usual euclidean norm of the complex number.

impl<F: Float, C: FloatChecker<F>> Norm<Abs> for NoisyFloat<F, C>[src]

type Output = Self

The resulting type of the norm function. Read more

impl Distance<Abs> for f32[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for f64[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for i8[src]

type Output = u8

The resulting type of the distance function. Read more

impl Distance<Abs> for i16[src]

type Output = u16

The resulting type of the distance function. Read more

impl Distance<Abs> for i32[src]

type Output = u32

The resulting type of the distance function. Read more

impl Distance<Abs> for i64[src]

type Output = u64

The resulting type of the distance function. Read more

impl Distance<Abs> for isize[src]

type Output = usize

The resulting type of the distance function. Read more

impl Distance<Abs> for u8[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for u16[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for u32[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for u64[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for usize[src]

type Output = Self

The resulting type of the distance function. Read more

impl Distance<Abs> for i128[src]

type Output = u128

The resulting type of the distance function. Read more

impl Distance<Abs> for u128[src]

type Output = Self

The resulting type of the distance function. Read more

impl<T: Float> Distance<Abs> for Complex<T>[src]

type Output = T

The resulting type of the distance function. Read more

fn distance(&self, other: &Self, _desc: Abs) -> T[src]

Calculates the usual euclidean norm of the complex number.

impl<F: Float, C: FloatChecker<F>> Distance<Abs> for NoisyFloat<F, C>[src]

type Output = Self

The resulting type of the distance function. Read more

impl Clone for Abs[src]

impl Default for Abs[src]

impl Copy for Abs[src]

impl Eq for Abs[src]

impl PartialEq<Abs> for Abs[src]

impl Debug for Abs[src]

impl Hash for Abs[src]

Auto Trait Implementations

impl Unpin for Abs

impl Sync for Abs

impl Send for Abs

impl UnwindSafe for Abs

impl RefUnwindSafe for Abs

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]