Changeset 4477 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators
- Timestamp:
- 09/23/10 17:12:30 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
-
Property
svn:mergeinfo
set to
/branches/DataAnalysis merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs
r4106 r4477 85 85 86 86 // find all invocations of the selected ADF and attach a cloned version of the replaced branch (with all argument-nodes expanded) 87 var invocationNodes = from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()88 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName89 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments90 select node;87 var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>() 88 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName 89 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments 90 select node).ToList(); 91 91 // do this repeatedly until no matching invocations are found 92 92 while (invocationNodes.Count() > 0) { … … 99 99 newlyAddedBranches.Add(clonedBranch); 100 100 } 101 invocationNodes = from newlyAddedBranch in newlyAddedBranches102 from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()103 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName104 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments105 select node;101 invocationNodes = (from newlyAddedBranch in newlyAddedBranches 102 from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>() 103 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName 104 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments 105 select node).ToList(); 106 106 } 107 107 // increase expected number of arguments of function defining branch -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs
r4106 r4477 79 79 } 80 80 // find invocations of the functions and duplicate the matching argument branch 81 var invocationNodes = from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()82 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName83 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments84 select node;81 var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>() 82 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName 83 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments 84 select node).ToList(); 85 85 // do this repeatedly until no matching invocations are found 86 86 while (invocationNodes.Count() > 0) { … … 92 92 newlyAddedBranches.Add(clonedArgumentBranch); 93 93 } 94 invocationNodes = from newlyAddedBranch in newlyAddedBranches95 from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()96 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName97 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments98 select node;94 invocationNodes = (from newlyAddedBranch in newlyAddedBranches 95 from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>() 96 where node.Symbol.FunctionName == selectedDefunBranch.FunctionName 97 where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments 98 select node).ToList(); 99 99 } 100 100 // register the new argument symbol and increase the number of arguments of the ADF
Note: See TracChangeset
for help on using the changeset viewer.