[][src]Trait theon::space::VectorSpace

pub trait VectorSpace: Add<Output = Self> + Adjunct<Item = Self::Scalar> + Copy + Fold + PartialEq + Mul<Self::Scalar, Output = Self> + Neg<Output = Self> + Zero + ZipMap<Self::Scalar, Output = Self> {
    type Scalar: AbsDiffEq + NumCast + Real;
    fn scalar_component(&self, index: usize) -> Option<&Self::Scalar>;

    fn from_x(x: Self::Scalar) -> Self
    where
        Self: Basis + FiniteDimensional<N = U1>
, { ... }
fn from_xy(x: Self::Scalar, y: Self::Scalar) -> Self
    where
        Self: Basis + FiniteDimensional<N = U2>
, { ... }
fn from_xyz(x: Self::Scalar, y: Self::Scalar, z: Self::Scalar) -> Self
    where
        Self: Basis + FiniteDimensional<N = U3>
, { ... }
fn into_x(self) -> Self::Scalar
    where
        Self: FiniteDimensional<N = U1>
, { ... }
fn into_xy(self) -> (Self::Scalar, Self::Scalar)
    where
        Self: FiniteDimensional<N = U2>
, { ... }
fn into_xyz(self) -> (Self::Scalar, Self::Scalar, Self::Scalar)
    where
        Self: FiniteDimensional<N = U3>
, { ... }
fn x(&self) -> Self::Scalar
    where
        Self: FiniteDimensional,
        Self::N: Cmp<U0, Output = Greater>
, { ... }
fn y(&self) -> Self::Scalar
    where
        Self: FiniteDimensional,
        Self::N: Cmp<U1, Output = Greater>
, { ... }
fn z(&self) -> Self::Scalar
    where
        Self: FiniteDimensional,
        Self::N: Cmp<U2, Output = Greater>
, { ... }
fn from_homogeneous(vector: Self::ProjectiveSpace) -> Option<Self>
    where
        Self: Homogeneous,
        Self::ProjectiveSpace: Pop<Output = Self> + VectorSpace<Scalar = Self::Scalar>
, { ... }
fn into_homogeneous(self) -> Self::ProjectiveSpace
    where
        Self: Homogeneous + Push<Output = Self::ProjectiveSpace>,
        Self::ProjectiveSpace: VectorSpace<Scalar = Self::Scalar>
, { ... }
fn mean<I>(vectors: I) -> Option<Self>
    where
        I: IntoIterator<Item = Self>
, { ... } }

Associated Types

type Scalar: AbsDiffEq + NumCast + Real

Loading content...

Required methods

fn scalar_component(&self, index: usize) -> Option<&Self::Scalar>

Loading content...

Provided methods

fn from_x(x: Self::Scalar) -> Self where
    Self: Basis + FiniteDimensional<N = U1>, 

fn from_xy(x: Self::Scalar, y: Self::Scalar) -> Self where
    Self: Basis + FiniteDimensional<N = U2>, 

fn from_xyz(x: Self::Scalar, y: Self::Scalar, z: Self::Scalar) -> Self where
    Self: Basis + FiniteDimensional<N = U3>, 

fn into_x(self) -> Self::Scalar where
    Self: FiniteDimensional<N = U1>, 

fn into_xy(self) -> (Self::Scalar, Self::Scalar) where
    Self: FiniteDimensional<N = U2>, 

fn into_xyz(self) -> (Self::Scalar, Self::Scalar, Self::Scalar) where
    Self: FiniteDimensional<N = U3>, 

fn x(&self) -> Self::Scalar where
    Self: FiniteDimensional,
    Self::N: Cmp<U0, Output = Greater>, 

fn y(&self) -> Self::Scalar where
    Self: FiniteDimensional,
    Self::N: Cmp<U1, Output = Greater>, 

fn z(&self) -> Self::Scalar where
    Self: FiniteDimensional,
    Self::N: Cmp<U2, Output = Greater>, 

fn from_homogeneous(vector: Self::ProjectiveSpace) -> Option<Self> where
    Self: Homogeneous,
    Self::ProjectiveSpace: Pop<Output = Self> + VectorSpace<Scalar = Self::Scalar>, 

fn into_homogeneous(self) -> Self::ProjectiveSpace where
    Self: Homogeneous + Push<Output = Self::ProjectiveSpace>,
    Self::ProjectiveSpace: VectorSpace<Scalar = Self::Scalar>, 

fn mean<I>(vectors: I) -> Option<Self> where
    I: IntoIterator<Item = Self>, 

Loading content...

Implementations on Foreign Types

impl<T> VectorSpace for Vector2<T> where
    T: AbsDiffEq + BaseNum + Real
[src]

type Scalar = T

impl<T> VectorSpace for Vector3<T> where
    T: AbsDiffEq + BaseNum + Real
[src]

type Scalar = T

impl<T, R, C> VectorSpace for MatrixMN<T, R, C> where
    T: AbsDiffEq + AddAssign + MulAssign + NumCast + Real + Scalar,
    R: DimName,
    C: DimName,
    DefaultAllocator: Allocator<T, R, C>,
    Self: Copy
[src]

type Scalar = T

Loading content...

Implementors

Loading content...