use crate::CausalMultiVectorError;
use core::ops::{AddAssign, Neg, SubAssign};
use deep_causality_num::Field;
pub trait MultiVector<T> {
fn grade_projection(&self, k: u32) -> Self
where
T: Field + Copy + Clone;
fn reversion(&self) -> Self
where
T: Field + Copy + Clone + Neg<Output = T>;
fn squared_magnitude(&self) -> T
where
T: Field + Copy + Clone + AddAssign + SubAssign + Neg<Output = T>;
fn inverse(&self) -> Result<Self, CausalMultiVectorError>
where
T: Field
+ Copy
+ Clone
+ AddAssign
+ SubAssign
+ Neg<Output = T>
+ core::ops::Div<Output = T>
+ PartialEq,
Self: Sized;
fn dual(&self) -> Result<Self, CausalMultiVectorError>
where
T: Field
+ Copy
+ Clone
+ AddAssign
+ SubAssign
+ Neg<Output = T>
+ core::ops::Div<Output = T>
+ PartialEq,
Self: Sized;
fn geometric_product(&self, rhs: &Self) -> Self
where
T: Field + Copy + Clone + AddAssign + SubAssign + Neg<Output = T>;
fn outer_product(&self, rhs: &Self) -> Self
where
T: Field + Copy + Clone + AddAssign + SubAssign;
fn inner_product(&self, rhs: &Self) -> Self
where
T: Field + Copy + Clone + AddAssign + SubAssign;
fn commutator_lie(&self, rhs: &Self) -> Self
where
T: Field + Copy + Clone + AddAssign + SubAssign + Neg<Output = T>;
fn commutator_geometric(&self, rhs: &Self) -> Self
where
T: Field
+ Copy
+ Clone
+ AddAssign
+ SubAssign
+ Neg<Output = T>
+ core::ops::Div<Output = T>;
fn basis_shift(&self, index: usize) -> Self
where
T: Clone;
}