Skip to main content

MultiVectorL2Norm

Trait MultiVectorL2Norm 

Source
pub trait MultiVectorL2Norm<T>
where T: Field + Copy + Sum,
{ type Output: RealField + Copy; // Required methods fn norm_l2(&self) -> Self::Output; fn normalize_l2(&self) -> Self; }
Expand description

Defines L2 norm operations for multivectors, treating their coefficients as a vector space.

Required Associated Types§

Source

type Output: RealField + Copy

Returns the Real magnitude type (e.g. f64 for Complex<f64>)

Required Methods§

Source

fn norm_l2(&self) -> Self::Output

Computes the L2 norm (Euclidean length) of the multivector’s coefficient vector.

$$ \text{norm} = \sqrt{\sum_i |c_i|^2} $$

This is a pure vector space norm and is independent of the algebra’s geometric metric.

Source

fn normalize_l2(&self) -> Self

Normalizes the multivector’s coefficient vector to have a unit L2 norm.

The resulting multivector M' will satisfy M'.norm_l2() == 1.0.

This is a pure vector space normalization and is independent of the algebra’s geometric metric.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§