示例#1
0
        public GaSymMultivector GetVectorPart()
        {
            var mv = GaSymMultivector.CreateZero(GaSpaceDimension);

            if (TermId.BasisBladeGrade() == 1)
            {
                mv.SetTermCoef(TermId, TermCoef);
            }

            return(mv);
        }
        public IGaSymMultivector this[int id1]
        {
            get
            {
                IGaSymMultivector mv;
                RootNode.TryGetLeafValue((ulong)id1, out mv);

                return(mv);
            }
            set
            {
                RootNode.SetLeafValue(
                    (ulong)id1,
                    value ?? GaSymMultivector.CreateZero(TargetGaSpaceDimension)
                    );
            }
        }
示例#3
0
 public GaSymMultivector ToMultivector()
 {
     return(TermCoef.IsZero()
         ? GaSymMultivector.CreateZero(GaSpaceDimension)
         : GaSymMultivector.CreateTerm(GaSpaceDimension, TermId, TermCoef));
 }