pub struct Blade(pub u32);Expand description
Basis blade represented as a bitmask of generator vectors. E.g., scalar = 0b0000, e_1 = 0b0001, e_2 = 0b0010, e_12 = 0b0011, e_123 = 0b0111.
Tuple Fields§
§0: u32Implementations§
Source§impl Blade
impl Blade
pub const SCALAR: Self
pub const fn new(mask: u32) -> Self
pub const fn generator(i: usize) -> Self
Sourcepub const fn reverse_sign(self) -> i8
pub const fn reverse_sign(self) -> i8
Reverse sign of the blade: (-1)^{k(k-1)/2}.
Sourcepub const fn involution_sign(self) -> i8
pub const fn involution_sign(self) -> i8
Grade involution sign of the blade: (-1)^k.
Sourcepub const fn conjugation_sign(self) -> i8
pub const fn conjugation_sign(self) -> i8
Clifford conjugation sign of the blade: (-1)^{k(k+1)/2}.
Sourcepub fn geometric_product<const P: usize, const Q: usize, const R: usize>(
self,
rhs: Self,
) -> Option<(Self, i8)>
pub fn geometric_product<const P: usize, const Q: usize, const R: usize>( self, rhs: Self, ) -> Option<(Self, i8)>
Computes the geometric product of two basis blades e_I * e_J under metric Cl(p, q, r). Returns Some((resulting_blade, sign)) or None if the result is zero (due to degenerate r-generators).
Sourcepub fn wedge_product(self, rhs: Self) -> Option<(Self, i8)>
pub fn wedge_product(self, rhs: Self) -> Option<(Self, i8)>
Computes the exterior wedge product e_I ^ e_J. Nonzero if and only if blades share no common generators (I & J == 0).
Trait Implementations§
impl Copy for Blade
impl Eq for Blade
Source§impl Ord for Blade
impl Ord for Blade
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Blade
impl PartialOrd for Blade
impl StructuralPartialEq for Blade
Auto Trait Implementations§
impl Forget for Blade
impl Freeze for Blade
impl Move for Blade
impl RefUnwindSafe for Blade
impl Send for Blade
impl Sync for Blade
impl Unpin for Blade
impl UnsafeUnpin for Blade
impl UnwindSafe for Blade
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more