pub trait EuclideanSpace:
AffineSpace<Translation = Self::Coordinates>
+ ClosedMul<Self::RealField>
+ ClosedDiv<Self::RealField>
+ Neg<Output = Self> {
type Coordinates: FiniteDimInnerSpace<RealField = Self::RealField, ComplexField = Self::RealField> + Add<Self::Coordinates, Output = Self::Coordinates> + AddAssign<Self::Coordinates> + Sub<Self::Coordinates, Output = Self::Coordinates> + SubAssign<Self::Coordinates> + Mul<Self::RealField, Output = Self::Coordinates> + MulAssign<Self::RealField> + Div<Self::RealField, Output = Self::Coordinates> + DivAssign<Self::RealField> + Neg<Output = Self::Coordinates>;
type RealField: RealField;
// Required method
fn origin() -> Self;
// Provided methods
fn scale_by(&self, s: Self::RealField) -> Self { ... }
fn coordinates(&self) -> Self::Coordinates { ... }
fn from_coordinates(coords: Self::Coordinates) -> Self { ... }
fn distance_squared(&self, b: &Self) -> Self::RealField { ... }
fn distance(&self, b: &Self) -> Self::RealField { ... }
}Expand description
The finite-dimensional affine space based on the field of reals.
Required Associated Types§
Sourcetype Coordinates: FiniteDimInnerSpace<RealField = Self::RealField, ComplexField = Self::RealField> + Add<Self::Coordinates, Output = Self::Coordinates> + AddAssign<Self::Coordinates> + Sub<Self::Coordinates, Output = Self::Coordinates> + SubAssign<Self::Coordinates> + Mul<Self::RealField, Output = Self::Coordinates> + MulAssign<Self::RealField> + Div<Self::RealField, Output = Self::Coordinates> + DivAssign<Self::RealField> + Neg<Output = Self::Coordinates>
type Coordinates: FiniteDimInnerSpace<RealField = Self::RealField, ComplexField = Self::RealField> + Add<Self::Coordinates, Output = Self::Coordinates> + AddAssign<Self::Coordinates> + Sub<Self::Coordinates, Output = Self::Coordinates> + SubAssign<Self::Coordinates> + Mul<Self::RealField, Output = Self::Coordinates> + MulAssign<Self::RealField> + Div<Self::RealField, Output = Self::Coordinates> + DivAssign<Self::RealField> + Neg<Output = Self::Coordinates>
The underlying finite vector space.
Required Methods§
Provided Methods§
Sourcefn scale_by(&self, s: Self::RealField) -> Self
fn scale_by(&self, s: Self::RealField) -> Self
Multiplies the distance of this point to Self::origin() by s.
Same as self * s.
Sourcefn coordinates(&self) -> Self::Coordinates
fn coordinates(&self) -> Self::Coordinates
The coordinates of this point, i.e., the translation from the origin.
Sourcefn from_coordinates(coords: Self::Coordinates) -> Self
fn from_coordinates(coords: Self::Coordinates) -> Self
Builds a point from its coordinates relative to the origin.
Sourcefn distance_squared(&self, b: &Self) -> Self::RealField
fn distance_squared(&self, b: &Self) -> Self::RealField
The distance between two points.
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.