Trait vector_space::basis::Basis[][src]

pub trait Basis<const I: usize>: VectorSpace {
    fn basis(&self) -> Self::Scalar;
fn basis_mut(&mut self) -> &mut Self::Scalar; fn unit_basis() -> Self { ... }
fn basis_of(magnitude: Self::Scalar) -> Self { ... }
fn with_basis(self, magnitude: Self::Scalar) -> Self { ... } }

This trait makes it possible to deal with the bases of a vector in a generic way.

Required methods

fn basis(&self) -> Self::Scalar[src]

Queries a basis of a vector space.

fn basis_mut(&mut self) -> &mut Self::Scalar[src]

Queries a basis of a vector space as a mutable reference.

Loading content...

Provided methods

fn unit_basis() -> Self[src]

Creates an unit basis of the vector space.

fn basis_of(magnitude: Self::Scalar) -> Self[src]

Creates a scaled basis of the vector space of the specified magnitude.

fn with_basis(self, magnitude: Self::Scalar) -> Self[src]

Creates a new vector with a single basis set to a different value.

Loading content...


Loading content...