//public int FactorsCount // => BasisBladesMapping // .LeafValues // .SelectMany(v => v.RootNode.LeafValues.Select(t => t.NonZeroTerms.Count())) // .Sum(); public override IGaNumMultivector this[int id1, int id2] { get { IGaNumMultivector mv; BasisBladesMapTree.TryGetLeafValue((ulong)id1, (ulong)id2, out mv); return(mv ?? GaNumMultivectorTerm.CreateZero(TargetGaSpaceDimension)); } }
//public int FactorsCount //{ // get // { // var count = 0; // for (var id1 = 0; id1 < DomainGaSpaceDimension1; id1++) // for (var id2 = 0; id2 < DomainGaSpaceDimension2; id2++) // { // var mv = _basisBladesMaps[id1, id2]; // if (!mv.IsNullOrZero()) // count += mv.NonZeroTerms.Count(); // } // return count; // } //} public override IGaNumMultivector this[int id1, int id2] => _basisBladesMaps[id1, id2] ?? GaNumMultivectorTerm.CreateZero(TargetGaSpaceDimension);