Exemplo n.º 1
0
	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;
	}
Exemplo n.º 2
0
	/*** 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;
        }
Exemplo n.º 3
0
	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;
	}