Trait vector_basis::Bases [−][src]
pub trait Bases: VectorSpace {
fn unit_bases<const I: usize>() -> Self
where
Self: Basis<I>,
{ ... }
fn bases_of<const I: usize>(magnitude: Self::Scalar) -> Self
where
Self: Basis<I>,
{ ... }
fn bases<const I: usize>(&self) -> Self::Scalar
where
Self: Basis<I>,
{ ... }
fn bases_mut<const I: usize>(&mut self) -> &mut Self::Scalar
where
Self: Basis<I>,
{ ... }
fn with_bases<const I: usize>(self, magnitude: Self::Scalar) -> Self
where
Self: Basis<I>,
{ ... }
}
Expand description
This trait makes it easy to deal with specified bases of a vector in a generic way.
Provided methods
fn unit_bases<const I: usize>() -> Self where
Self: Basis<I>,
fn unit_bases<const I: usize>() -> Self where
Self: Basis<I>,
Creates the specified unit basis of the vector space.
Creates the specified basis of the vector of the specified magnitude.
Queries the specified basis of a vector space.
Queries the specified basis of a vector space as a mutable reference.
fn with_bases<const I: usize>(self, magnitude: Self::Scalar) -> Self where
Self: Basis<I>,
fn with_bases<const I: usize>(self, magnitude: Self::Scalar) -> Self where
Self: Basis<I>,
Creates a new vector with the specified basis set to a different value.