pub trait Vector:
Copy
+ Add<Output = Self>
+ Sub<Output = Self>
+ Mul<Self::Scalar, Output = Self> {
type Scalar: Scalar;
// Required methods
fn zero() -> Self;
fn dot(self, rhs: Self) -> Self::Scalar;
fn norm(self) -> Self::Scalar;
}Expand description
A displacement or derivative in Euclidean space.
Vectors represent displacements and derivatives (e.g. tangent vectors).
They form a linear space: addition, subtraction, and scalar multiplication
are required, along with dot product and Euclidean norm.
Required Associated Types§
Required Methods§
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.