[−][src]Struct norman::desc::PNormReal
A descriptor that represents a real-valued p-norm.
Create one with new
or from_f32
.
If you only need a real valued p, consider using
PNorm
instead since it only calculates integral powers.
Negative values for p are completely allowed and there will be no bad behaviour if one tries to calculate a p-norm with a negative p, but the result will probably be mathematical nonsense.
Methods
impl PNormReal
[src]
pub fn new(p: R32) -> Self
[src]
Creates a descriptor of the p
-norm.
A “NaN-norm” or “Inf-norm” does not make sense,
so p-norms are represented by a noisy_float
which cannot be Nan
or +/- Infinity.
pub fn from_u16(p: u16) -> Self
[src]
Creates a descriptor of the p
-norm.
pub fn from_f32(p: f32) -> Self
[src]
pub fn eucl() -> Self
[src]
Creates a descriptor of the euclidean norm, i.e. the 2-norm.
pub fn p1() -> Self
[src]
Creates a descriptor of the 1-norm.
Trait Implementations
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 0]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 1]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 2]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 3]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 4]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 5]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 6]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 7]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 8]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 9]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 10]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 11]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 12]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 13]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 14]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 15]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 16]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 17]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 18]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 19]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 20]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 21]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 22]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 23]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 24]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 25]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 26]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 27]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 28]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 29]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 30]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 31]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for [T; 32]
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for Vec<T>
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Norm<Abs, Output = R>, R: Float + From<f32>> Norm<PNormReal> for VecDeque<T>
[src]
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<S, D, T, R> Norm<PNormReal> for ArrayBase<S, D> where
S: Data<Elem = T>,
D: Dimension,
T: Norm<Abs, Output = R>,
R: Float + From<f32>,
[src]
S: Data<Elem = T>,
D: Dimension,
T: Norm<Abs, Output = R>,
R: Float + From<f32>,
type Output = <T as Norm<Abs>>::Output
The resulting type of the norm function. Read more
fn norm(&self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 0]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 1]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 2]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 3]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 4]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 5]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 6]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 7]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 8]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 9]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 10]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 11]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 12]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 13]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 14]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 15]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 16]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 17]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 18]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 19]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 20]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 21]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 22]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 23]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 24]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 25]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 26]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 27]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 28]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 29]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 30]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 31]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for [T; 32]
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for Vec<T>
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<T: Distance<Abs, Output = R>, R: Float + From<f32>> Distance<PNormReal> for VecDeque<T>
[src]
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl<S, D, T: Debug, R> Distance<PNormReal> for ArrayBase<S, D> where
S: Data<Elem = T>,
D: Dimension,
T: Distance<Abs, Output = R>,
R: Float + From<f32>,
[src]
S: Data<Elem = T>,
D: Dimension,
T: Distance<Abs, Output = R>,
R: Float + From<f32>,
type Output = <T as Distance<Abs>>::Output
The resulting type of the distance function. Read more
fn distance(&self, other: &Self, desc: PNormReal) -> Self::Output
[src]
impl Eq for PNormReal
[src]
impl Clone for PNormReal
[src]
impl PartialEq<PNormReal> for PNormReal
[src]
impl Copy for PNormReal
[src]
impl Hash for PNormReal
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Debug for PNormReal
[src]
Auto Trait Implementations
impl Unpin for PNormReal
impl Sync for PNormReal
impl Send for PNormReal
impl UnwindSafe for PNormReal
impl RefUnwindSafe for PNormReal
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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,