Changeset 4477 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs
- Timestamp:
- 09/23/10 17:12:30 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 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/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.