Changeset 2631
- Timestamp:
- 01/15/10 18:42:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/NetworkToFunctionTransformer.cs
r2630 r2631 50 50 while (scope.SubScopes.Count > 0) scope.RemoveSubScope(scope.SubScopes[0]); 51 51 52 var targetVariableEnumerator = targetVariables.Select(x => x.Data).GetEnumerator(); 52 53 // create a new sub-scope for each target variable with the transformed expression 53 54 foreach (IFunctionTree transformedTree in Transform(model.FunctionTree, targetVariables.Select(x => x.Data))) { 55 targetVariableEnumerator.MoveNext(); 54 56 Scope exprScope = new Scope(); 55 57 scope.AddSubScope(exprScope); 56 58 exprScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("FunctionTree"), new GeneticProgrammingModel(transformedTree))); 59 exprScope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("TargetVariable"), new StringData(targetVariableEnumerator.Current))); 57 60 } 58 61
Note: See TracChangeset
for help on using the changeset viewer.