Esempio n. 1
0
 public override GaSymMultivectorTerm MapToTerm(int id1, int id2)
 {
     return(GaSymMultivectorTerm.CreateTerm(
                TargetGaSpaceDimension,
                id1 ^ id2,
                GMacMathUtils.IsNonZeroERcp(id1, id2)
             ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? Expr.INT_MINUSONE : Expr.INT_ONE)
             : Expr.INT_ZERO
                ));
 }
Esempio n. 2
0
 public override GaNumMultivectorTerm MapToTerm(int id1, int id2)
 {
     return(GaNumMultivectorTerm.CreateTerm(
                TargetGaSpaceDimension,
                id1 ^ id2,
                GMacMathUtils.IsNonZeroERcp(id1, id2)
             ? (GMacMathUtils.IsNegativeEGp(id1, id2) ? -1.0d : 1.0d)
             : 0.0d
                ));
 }
Esempio n. 3
0
 public override GaSymMultivectorTerm MapToTerm(int id1, int id2)
 {
     return(GaSymMultivectorTerm.CreateTerm(
                TargetGaSpaceDimension,
                id1 ^ id2,
                GMacMathUtils.IsNonZeroERcp(id1, id2)
             ? (GMacMathUtils.IsNegativeEGp(id1, id2)
                 ? Mfs.Minus[OrthonormalMetric.GetExprSignature(id1 & id2)]
                 : OrthonormalMetric.GetExprSignature(id1 & id2))
             : Expr.INT_ZERO
                ));
 }
Esempio n. 4
0
        public override IGaSymMultivectorTemp MapToTemp(int id1, int id2)
        {
            var tempMultivector = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension);

            if (GMacMathUtils.IsNonZeroERcp(id1, id2))
            {
                tempMultivector.SetTermCoef(
                    id1 ^ id2,
                    GMacMathUtils.IsNegativeEGp(id1, id2),
                    OrthonormalMetric.GetExprSignature(id1 & id2)
                    );
            }

            return(tempMultivector);
        }
Esempio n. 5
0
        public override IGaSymMultivectorTemp MapToTemp(int id1, int id2)
        {
            var tempMultivector = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension);

            if (GMacMathUtils.IsNonZeroERcp(id1, id2))
            {
                tempMultivector.SetTermCoef(
                    id1 ^ id2,
                    GMacMathUtils.IsNegativeEGp(id1, id2),
                    Expr.INT_ONE
                    );
            }

            return(tempMultivector);
        }