pub trait Affine: Sized {
type Space;
type Diff: Linear;
const DIM: usize;
// Required methods
fn add(&self, diff: &Self::Diff) -> Self;
fn sub(&self, other: &Self) -> Self::Diff;
// Provided method
fn combine<S: Copy, const N: usize>(
weights: &[S; N],
points: &[Self; N],
) -> Self
where Self: Clone,
Self::Diff: Linear<Scalar = S> { ... }
}Expand description
Trait for types representing elements of an affine space.
TODO More documentation, definition of affine space
Required Associated Constants§
Required Associated Types§
Required Methods§
Provided 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.