Changeset 18220 for trunk/HeuristicLab.Problems.ExternalEvaluation.GP
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationExpressionGrammar.cs
r18132 r18220 21 21 22 22 using System.Collections.Generic; 23 using System.Linq;24 23 using HEAL.Attic; 25 24 using HeuristicLab.Common; … … 66 65 number.MinValue = -20; 67 66 number.MaxValue = 20; 68 var constant = new Constant(); 67 var constant = new Constant() { Enabled = false }; 68 69 69 70 variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 70 71 … … 89 90 SetSubtreeCount(@if, 3, 3); 90 91 SetSubtreeCount(number, 0, 0); 91 SetSubtreeCount(constant, 0, 0);92 SetSubtreeCount(constant, 0, 0); 92 93 SetSubtreeCount(variableSymbol, 0, 0); 93 94 … … 104 105 } 105 106 } 106 107 Symbols.First(s => s is Constant).Enabled = false;108 107 } 109 108 } -
trunk/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationSymbolicExpressionTreeStringFormatter.cs
r18132 r18220 58 58 StringBuilder strBuilder = new StringBuilder(); 59 59 if (Indent) strBuilder.Append(' ', indentLength); 60 if (node.Subtrees.Any()) { // internal node 60 if(node.Symbol is SubFunctionSymbol) { 61 return FormatRecursively(node.GetSubtree(0), indentLength); 62 } else if (node.Subtrees.Any()) { // internal node 61 63 strBuilder.Append("("); 62 64 if (node.Symbol is Addition) {
Note: See TracChangeset
for help on using the changeset viewer.