[][src]Enum rulinalg::norm::Lp

pub enum Lp<T: Float> {
    Infinity,
    Integer(i32),
    Float(T),
}

The Lp norm

The Lp norm computes the pth root of the sum of elements to the pth power.

The Lp norm requires p to be greater than or equal 1.

We use an enum for this norm to allow us to explicitly handle special cases at compile time. For example, we have an Infinity variant which handles the special case when the Lp norm is a supremum over absolute values. The Integer variant gives us a performance boost when p is an integer.

You should avoid matching directly against this enum as it is likely to grow.

Variants

Infinity

The L-infinity norm (supremum)

Integer(i32)

The Lp norm where p is an integer

Float(T)

The Lp norm where p is a float

Trait Implementations

impl<T: Float> VectorNorm<T> for Lp<T>[src]

impl<T: Float, M: BaseMatrix<T>> MatrixNorm<T, M> for Lp<T>[src]

impl<T: Debug + Float> Debug for Lp<T>[src]

Auto Trait Implementations

impl<T> Sync for Lp<T> where
    T: Sync

impl<T> Send for Lp<T> where
    T: Send

impl<T> Unpin for Lp<T> where
    T: Unpin

impl<T> UnwindSafe for Lp<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Lp<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<U, T> VectorMetric<T> for U where
    T: Copy + Sub<T, Output = T>,
    U: VectorNorm<T>, 
[src]

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

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

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]