Beispiel #1
0
        public override IGaSymMultivectorTemp MapToTemp(GaSymMultivector mv1, GaSymMultivector mv2)
        {
            if (mv1.GaSpaceDimension != DomainGaSpaceDimension || mv2.GaSpaceDimension != DomainGaSpaceDimension2)
            {
                throw new GMacSymbolicException("Multivector size mismatch");
            }

            return(GaSymMultivector
                   .CreateZeroTemp(TargetGaSpaceDimension)
                   .AddFactors(mv1.GetBiTermsForEGp(mv2)));
        }
        public static GaSymMultivector EGp(this GaSymMultivector mv1, GaSymMultivector mv2)
        {
            if (mv1.GaSpaceDimension != mv2.GaSpaceDimension)
            {
                throw new GMacSymbolicException("Multivector size mismatch");
            }

            return(GaSymMultivector
                   .CreateZeroTemp(mv1.GaSpaceDimension)
                   .AddFactors(mv1.GetBiTermsForEGp(mv2))
                   .ToMultivector());
        }
Beispiel #3
0
        public override IGaSymMultivectorTemp MapToTemp(GaSymMultivector mv1, GaSymMultivector mv2)
        {
            if (mv1.GaSpaceDimension != DomainGaSpaceDimension || mv2.GaSpaceDimension != DomainGaSpaceDimension)
            {
                throw new GMacSymbolicException("Multivector size mismatch");
            }

            var tempMv = GaSymMultivector.CreateZeroTemp(TargetGaSpaceDimension);

            foreach (var biTerm in mv1.GetBiTermsForEGp(mv2))
            {
                var basisBladeMv = _basisBladesMaps[biTerm.Id1, biTerm.Id2];
                if (ReferenceEquals(basisBladeMv, null))
                {
                    continue;
                }

                tempMv.AddFactors(biTerm.ValuesProduct, basisBladeMv);
            }

            return(tempMv);
        }