[−][src]Enum rulinalg::norm::Lp
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
InfinityThe 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,
T: Sync,
impl<T> Send for Lp<T> where
T: Send,
T: Send,
impl<T> Unpin for Lp<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Lp<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Lp<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<U, T> VectorMetric<T> for U where
T: Copy + Sub<T, Output = T>,
U: VectorNorm<T>, [src]
T: Copy + Sub<T, Output = T>,
U: VectorNorm<T>,
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,