- Timestamp:
- 01/24/14 20:07:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GPDL/CodeGenerator/BruteForceCodeGen.cs
r10393 r10394 106 106 if (problem.IsBetter(f, bestF)) { 107 107 bestF = f; 108 t.PrintTree(0); Console.WriteLine(); 108 109 Console.WriteLine(""{0}\t{1}\t(size={2}, depth={3})"", n, bestF, size, depth); 109 110 } … … 153 154 sb.AppendFormat("t = new {0}Tree();", terminal.Ident).AppendLine(); 154 155 155 foreach (var constr in terminal.Constraints.Reverse()) { 156 sb.AppendFormat("t.{0} = {0};", constr.Ident).EndBlock(); 157 sb.AppendLine("}"); 156 foreach (var constr in terminal.Constraints) { 157 sb.AppendFormat("t.{0} = {0};", constr.Ident); 158 } 159 sb.AppendLine("yield return t; "); 160 161 foreach (var _ in terminal.Constraints) { 162 sb.AppendLine("}").EndBlock(); 158 163 } 159 164 160 sb.AppendLine("yield return t; ").EndBlock();161 165 162 166 sb.AppendLine(" break; }");
Note: See TracChangeset
for help on using the changeset viewer.