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

            if (GMacMathUtils.IsNonZeroEAcp(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.IsNonZeroEAcp(id1, id2))
            {
                tempMultivector.SetTermCoef(
                    id1 ^ id2,
                    GMacMathUtils.IsNegativeEGp(id1, id2),
                    OrthonormalMetric.GetExprSignature(id1 & id2)
                    );
            }

            return(tempMultivector);
        }