pub enum Norm {
Euc = 0,
Fro = 1,
Inf = 2,
Max = 3,
One = 4,
}Expand description
Options to compute vector and matrix norms
Variants§
Euc = 0
Specifies the Euclidean-norm
matrix
Will compute the same as Norm::Fro
vector
‖u‖_2 = sqrt(Σ_i |uᵢ|⋅|uᵢ|)Fro = 1
Specifies the Frobenius-norm (2-norm)
matrix
‖a‖_F = sqrt(Σ_i Σ_j |aᵢⱼ|⋅|aᵢⱼ|) == ‖a‖_2vector
Will compute the same as Norm::Euc
Inf = 2
Specifies the Inf-norm
matrix
‖a‖_∞ = max_i ( Σ_j |aᵢⱼ| )vector
Will compute that same as Norm::Max
Max = 3
Specifies the Max-norm
matrix
‖a‖_max = max_ij ( |aᵢⱼ| )vector
‖u‖_max = max_i ( |uᵢ| ) == ‖u‖_∞One = 4
Specifies the 1-norm
matrix
‖a‖_1 = max_j ( Σ_i |aᵢⱼ| )vector (taxicab or sum of abs values)
‖u‖_1 := sum_i |uᵢ|Trait Implementations§
impl Copy for Norm
impl Eq for Norm
impl StructuralPartialEq for Norm
Auto Trait Implementations§
impl Freeze for Norm
impl RefUnwindSafe for Norm
impl Send for Norm
impl Sync for Norm
impl Unpin for Norm
impl UnsafeUnpin for Norm
impl UnwindSafe for Norm
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more