public override GaSymMultivectorTerm MapToTerm(int id1, int id2) { return(GaSymMultivectorTerm.CreateTerm( TargetGaSpaceDimension, id1 ^ id2, GMacMathUtils.IsNonZeroELcp(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.IsNonZeroELcp(id1, id2) ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? -1.0d : 1.0d) : 0.0d )); }
public override GaSymMultivectorTerm MapToTerm(int id1, int id2) { return(GaSymMultivectorTerm.CreateTerm( TargetGaSpaceDimension, id1 ^ id2, GMacMathUtils.IsNonZeroELcp(id1, id2) ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? Mfs.Minus[OrthonormalMetric.GetExprSignature(id1 & id2)] : OrthonormalMetric.GetExprSignature(id1 & id2)) : Expr.INT_ZERO )); }
public override IGaSymMultivectorTemp MapToTemp(int id1, int id2) { var tempMultivector = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension); if (GMacMathUtils.IsNonZeroELcp(id1, id2)) { tempMultivector.SetTermCoef( id1 ^ id2, GMacMathUtils.IsNegativeEGp(id1, id2), OrthonormalMetric.GetExprSignature(id1 & id2) ); } return(tempMultivector); }
public override IGaSymMultivectorTemp MapToTemp(int id1, int id2) { var tempMultivector = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension); if (GMacMathUtils.IsNonZeroELcp(id1, id2)) { tempMultivector.SetTermCoef( id1 ^ id2, GMacMathUtils.IsNegativeEGp(id1, id2), Expr.INT_ONE ); } return(tempMultivector); }