Trait alga::linear::EuclideanSpace
[−]
[src]
pub trait EuclideanSpace: AffineSpace<Translation=Self::Vector> { type Vector: FiniteDimInnerSpace<Real=Self::Real> + Mul<Self::Real, Output=Self::Vector> + MulAssign<Self::Real> + Div<Self::Real, Output=Self::Vector> + DivAssign<Self::Real> + Neg<Output=Self::Vector>; type Real: Real; fn origin() -> Self; fn scale_by(&self, s: Self::Real) -> Self { ... } fn coordinates(&self) -> Self::Vector { ... } fn distance_squared(&self, b: &Self) -> Self::Real { ... } fn distance(&self, b: &Self) -> Self::Real { ... } }
The finite-dimensional affine space based on the field of reals.
Associated Types
type Vector: FiniteDimInnerSpace<Real=Self::Real> + Mul<Self::Real, Output=Self::Vector> + MulAssign<Self::Real> + Div<Self::Real, Output=Self::Vector> + DivAssign<Self::Real> + Neg<Output=Self::Vector>
The underlying finite vector space.
type Real: Real
The underlying reals.
Required Methods
fn origin() -> Self
The preferred origin of this euclidean space.
Theoretically, an euclidean space has no clearly defined origin. Though it is almost always useful to have some reference point to express all the others as translations of it.
Provided Methods
fn scale_by(&self, s: Self::Real) -> Self
Multiplies the distance of this point to Self::origin()
by s
.
fn coordinates(&self) -> Self::Vector
The coordinates of this point, i.e., the translation from the prefered origin.
fn distance_squared(&self, b: &Self) -> Self::Real
The distance between two points.
fn distance(&self, b: &Self) -> Self::Real
The distance between two points.