- Timestamp:
- 01/18/10 10:56:50 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/NetworkToFunctionTransformer.cs
r2633 r2635 51 51 52 52 var targetVariableEnumerator = targetVariables.Select(x => x.Data).GetEnumerator(); 53 List<IFunctionTree> transformedTrees = new List<IFunctionTree>(Transform(model.FunctionTree, targetVariables.Select(x => x.Data))); 53 54 // create a new sub-scope for each target variable with the transformed expression 54 foreach (IFunctionTree transformedTree in Transform(model.FunctionTree, targetVariables.Select(x => x.Data))) {55 foreach (IFunctionTree transformedTree in transformedTrees) { 55 56 targetVariableEnumerator.MoveNext(); 56 57 Scope exprScope = new Scope(); … … 72 73 // create a new sub-scope for each target variable with the transformed expression 73 74 foreach (var targetVariable in targetVariables) { 74 yield return TransformExpression( boundExpression, targetVariable, targetVariables.Except(new string[] { targetVariable }));75 yield return TransformExpression((IFunctionTree)boundExpression.Clone(), targetVariable, targetVariables.Except(new string[] { targetVariable })); 75 76 } 76 77 }
Note: See TracChangeset
for help on using the changeset viewer.