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

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

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

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

            return(tempMultivector);
        }