public override GaSymMultivector BasisBladeSignature(int id)
        {
            var basisBlade = GaSymMultivector.CreateBasisBlade(GaSpaceDimension, id);

            var sig = Gp[basisBlade, basisBlade];

            return(id.BasisBladeIdHasNegativeReverse() ? -sig : sig);
        }
Beispiel #2
0
 public override IEnumerable <Tuple <int, IGaSymMultivector> > BasisBladeMaps()
 {
     return(Enumerable.Range(0, TargetGaSpaceDimension)
            .Select(id => new Tuple <int, IGaSymMultivector>(
                        id,
                        GaSymMultivector.CreateBasisBlade(TargetGaSpaceDimension, id)
                        )));
 }
 /// <summary>
 /// Convert this basis blade into a multivector value with unity coefficient of its single term
 /// </summary>
 /// <returns></returns>
 public AstValueMultivector ToMultivectorValue()
 {
     return(new AstValueMultivector(
                GMacValueMultivector.Create(
                    AssociatedFrame.MultivectorType,
                    GaSymMultivector.CreateBasisBlade(
                        AssociatedFrame.GaSpaceDimension,
                        BasisBladeId
                        )
                    )
                ));
 }
Beispiel #4
0
        public IEnumerable <GaSymMultivector> RotorProduct(GaSymMultivector rotorVersor, IEnumerable <int> basisBladeIDs)
        {
            var rotorVersorInverse = rotorVersor.Reverse();

            return(basisBladeIDs.Select(id =>
            {
                var mv = GaSymMultivector.CreateBasisBlade(GaSpaceDimension, id);

                return
                Gp[Gp[rotorVersor, mv], rotorVersorInverse]
                .GetKVectorPart(id.BasisBladeGrade());
            }));
        }
Beispiel #5
0
        public IEnumerable <GaSymMultivector> EvenVersorProduct(GaSymMultivector evenVersor, IEnumerable <int> basisBladeIDs)
        {
            var evenVersorReverse      = evenVersor.Reverse();
            var evenVersorNorm2Inverse =
                SymbolicUtils.Constants.One / Sp[evenVersor, evenVersorReverse][0]
                .ToMathematicaScalar();
            var evenVersorInverse = evenVersorReverse * evenVersorNorm2Inverse;

            return(basisBladeIDs.Select(id =>
            {
                var mv = GaSymMultivector.CreateBasisBlade(GaSpaceDimension, id);

                return
                Gp[Gp[evenVersor, mv], evenVersorInverse]
                .GetKVectorPart(id.BasisBladeGrade());
            }));
        }
        internal static GMacValueMultivector CreateBasisBlade(GMacFrameMultivector mvType, int id)
        {
            var mvCoefs = GaSymMultivector.CreateBasisBlade(mvType.ParentFrame.GaSpaceDimension, id);

            return(new GMacValueMultivector(mvType, mvCoefs));
        }
Beispiel #7
0
 public GaSymMultivector CreateUnitPseudoScalar()
 {
     return(GaSymMultivector.CreateBasisBlade(GaSpaceDimension, MaxBasisBladeId));
 }
Beispiel #8
0
        public override IGaSymMultivectorTemp MapToTemp(int id1)
        {
            var mv1 = GaSymMultivector.CreateBasisBlade(TargetGaSpaceDimension, id1);

            return(MapToTemp(mv1));
        }
Beispiel #9
0
 public override IGaSymMultivector this[int id1]
 => GaSymMultivector.CreateBasisBlade(TargetGaSpaceDimension, id1);