コード例 #1
0
 public virtual void Visit(SimpleTreeBranchDictionaryByIndex <TLeaf> treeNode)
 {
     foreach (var pair in treeNode)
     {
         Visit(pair.Value);
     }
 }
コード例 #2
0
ファイル: ScriptUtils.cs プロジェクト: cloudRoutine/GMac
        internal static SimpleTreeBranchDictionaryByIndex <string> ToSimpleStringTree(this GMacValueMultivector value)
        {
            var scalarTypeName = value.CoefficientType.SymbolAccessName;
            var tree           = new SimpleTreeBranchDictionaryByIndex <string>();

            foreach (var pair in value.SymbolicMultivector.NonZeroExprTerms)
            {
                tree.Add(pair.Key, "#E" + pair.Key + "#", scalarTypeName, pair.Value.ToString());
            }

            return(tree);
        }
コード例 #3
0
ファイル: ScriptUtils.cs プロジェクト: phreed/GMac
        internal static SimpleTreeBranchDictionaryByIndex <Expr> ToSimpleExprTree(this GMacValueMultivector value)
        {
            var scalarTypeName = value.CoefficientType.SymbolAccessName;
            var tree           = new SimpleTreeBranchDictionaryByIndex <Expr>();

            foreach (var pair in value.MultivectorCoefficients)
            {
                tree.Add(pair.Key, "#E" + pair.Key + "#", scalarTypeName, pair.Value.MathExpr);
            }

            return(tree);
        }