public static GaSymMapUnilinearCoefSums ToCoefSumsMap(this IGaSymMapUnilinear linearMap) { var resultMap = GaSymMapUnilinearCoefSums.Create( linearMap.DomainVSpaceDimension, linearMap.TargetVSpaceDimension ); foreach (var basisBladeMap in linearMap.BasisBladeMaps()) { resultMap.SetBasisBladeMap(basisBladeMap.Item1, basisBladeMap.Item2); } return(resultMap); }
public static MathematicaScalar[,] ToScalarsArray(this IGaSymMapUnilinear linearMap) { var resultArray = new MathematicaScalar[ linearMap.TargetGaSpaceDimension, linearMap.DomainGaSpaceDimension ]; foreach (var basisBladeMap in linearMap.BasisBladeMaps()) { var col = basisBladeMap.Item1; foreach (var term in basisBladeMap.Item2.NonZeroExprTerms) { var row = term.Key; resultArray[row, col] = term.Value.ToMathematicaScalar(); } } return(resultArray); }
public static Dictionary <int, IGaSymMultivector> ToDictionary(this IGaSymMapUnilinear linearMap) { return(linearMap .BasisBladeMaps() .ToDictionary(t => t.Item1, t => t.Item2)); }