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) ); } }
public GaSymMultivector ToMultivector() { return(TermCoef.IsZero() ? GaSymMultivector.CreateZero(GaSpaceDimension) : GaSymMultivector.CreateTerm(GaSpaceDimension, TermId, TermCoef)); }