pub trait Algebrawhere
Self: Copy + Clone + Eq + PartialEq + Ord + PartialOrd + Default + Into<Symbol> + TryFrom<Symbol, Error = Symbol> + Debug + Display + Mul<Output = (i8, Self)> + Not<Output = (i8, Self)>,{
const N: u32;
// Required methods
fn basis( ) -> impl ExactSizeIterator<Item = Self> + DoubleEndedIterator<Item = Self>;
fn scalar() -> Self;
fn pseudoscalar() -> Self;
fn grade(&self) -> u32;
fn blade_len(&self) -> usize;
// Provided method
fn rev(self) -> (i8, Self) { ... }
}Expand description
A geometric algebra defined by a flavor’s basis (i.e., all its basis blades).
Implementations for this trait (e.g., pga::Pga) define the basis of a particular flavor from
which the Cayley table can be constructed. The generators of a basis (i.e., the basis blades
of Self::grade() == 1) define the whole algebra whereas the required Mul
operator implements the signature-aware anti-commutative multiplication for the chosen storage.
Required Associated Constants§
Required Methods§
Sourcefn basis() -> impl ExactSizeIterator<Item = Self> + DoubleEndedIterator<Item = Self>
fn basis() -> impl ExactSizeIterator<Item = Self> + DoubleEndedIterator<Item = Self>
The ordered basis (i.e., all basis blades).
Sourcefn pseudoscalar() -> Self
fn pseudoscalar() -> Self
The pseudoscalar.
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.