pub trait NormedVectorSpace<S: Field>: InnerProductSpace<S> {
type Unit: Into<Self>;
// Required methods
fn norm_squared(self) -> NonNegative<S>;
fn norm_max(self) -> NonNegative<S>
where S: SignedExt;
fn normalize(self) -> Self::Unit
where S: Sqrt;
// Provided methods
fn norm(self) -> NonNegative<S>
where S: Sqrt { ... }
fn unit_sigvec(self) -> Self
where S: SignedExt + Sqrt { ... }
}Expand description
VectorSpace with vector length/magnitude function
Required Associated Types§
Required Methods§
fn norm_squared(self) -> NonNegative<S>
Sourcefn norm_max(self) -> NonNegative<S>where
S: SignedExt,
fn norm_max(self) -> NonNegative<S>where
S: SignedExt,
Infinity norm or uniform norm
fn normalize(self) -> Self::Unitwhere
S: Sqrt,
Provided Methods§
fn norm(self) -> NonNegative<S>where
S: Sqrt,
Sourcefn unit_sigvec(self) -> Self
fn unit_sigvec(self) -> Self
Returns zero vector if input is the zero vector, otherwise a normalized vector of each axis sign.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".