public override GaSymMultivectorTerm MapToTerm(int id1, int id2) { return(GaSymMultivectorTerm.CreateTerm( TargetGaSpaceDimension, id1 ^ id2, GMacMathUtils.IsNonZeroOp(id1, id2) ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? Expr.INT_MINUSONE : Expr.INT_ONE) : Expr.INT_ZERO )); }
public override GaNumMultivectorTerm MapToTerm(int id1, int id2) { return(GaNumMultivectorTerm.CreateTerm( TargetGaSpaceDimension, id1 ^ id2, GMacMathUtils.IsNonZeroOp(id1, id2) ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? -1.0d : 1.0d) : 0.0d )); }
public override IGaSymMultivectorTemp MapToTemp(int id1, int id2) { var tempMultivector = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension); if (GMacMathUtils.IsNonZeroOp(id1, id2)) { tempMultivector.SetTermCoef( id1 ^ id2, GMacMathUtils.IsNegativeEGp(id1, id2), Expr.INT_ONE ); } return(tempMultivector); }