GCA_antitrivector operator~(const GCA_vector& v) { GCA_antitrivector a; a.set(e123, -v.get(e4)); a.set(e124, v.get(e3)); a.set(e134, -v.get(e2)); a.set(e234, v.get(e1)); return a; }
/*** Base duale **/ GCA_antitrivector operator~(const GCA_vector& vector) { GCA_antitrivector antitrivector; antitrivector.setBases(); antitrivector.set(e123, -vector.get(e4)); antitrivector.set(e124, vector.get(e3)); antitrivector.set(e134, -vector.get(e2)); antitrivector.set(e234, vector.get(e1)); return antitrivector; }
GCA_vector operator^ (const GCA_vector& b, const GCA_scalar& a){ GCA_vector res; for (int i=0; i<b.size();++i){ res(i) = a * b(i); } return res; }
GCA_trivector operator^(const GCA_bivector& a, const GCA_vector& b) { GCA_trivector triv; triv.set(Base::e123, a.get(e12)*b.get(e3)-a.get(e13)*b.get(e2)+a.get(e23)*b.get(e1)); triv.set(Base::e124, a.get(e12)*b.get(e4)-a.get(e14)*b.get(e2)+a.get(e24)*b.get(e1)); triv.set(Base::e134, a.get(e13)*b.get(e4)-a.get(e14)*b.get(e3)+a.get(e34)*b.get(e1)); triv.set(Base::e234, a.get(e23)*b.get(e4)-a.get(e24)*b.get(e3)+a.get(e34)*b.get(e2)); return triv; }