Changeset 4869
- Timestamp:
- 11/20/10 02:15:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.Extensions/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Formatters/SymbolicExpressionTreeSmalltalkStringFormatter.cs
r4868 r4869 59 59 for (int i = 0; i < node.SubTrees.Count; i++) { 60 60 if (i > 0) stringBuilder.Append("+"); 61 stringBuilder.Append("(");62 61 stringBuilder.Append(FormatRecursively(node.SubTrees[i])); 63 stringBuilder.Append(")");64 62 } 65 63 } else if (symbol is And) { … … 85 83 } else if (symbol is Constant) { 86 84 ConstantTreeNode constantTreeNode = node as ConstantTreeNode; 87 stringBuilder.Append(constantTreeNode.Value );85 stringBuilder.Append(constantTreeNode.Value.ToString().Replace(",", ".")); 88 86 } else if (symbol is Cosine) { 89 87 stringBuilder.Append(FormatRecursively(node.SubTrees[0])); … … 118 116 stringBuilder.Append("] ifFalse: ["); 119 117 stringBuilder.Append(FormatRecursively(node.SubTrees[2])); 120 stringBuilder.Append("] )");118 stringBuilder.Append("]"); 121 119 } else if (symbol is LaggedVariable) { 122 120 stringBuilder.Append("not implemented"); … … 136 134 } 137 135 } else if (symbol is Not) { 138 stringBuilder.Append("- ");136 stringBuilder.Append("-1*"); 139 137 stringBuilder.Append(FormatRecursively(node.SubTrees[0])); 140 138 } else if (symbol is Or) { … … 152 150 } else if (symbol is Subtraction) { 153 151 if (node.SubTrees.Count == 1) { 154 stringBuilder.Append("- ");152 stringBuilder.Append("-1*"); 155 153 stringBuilder.Append(FormatRecursively(node.SubTrees[0])); 156 154 } else { … … 166 164 } else if (symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable) { 167 165 VariableTreeNode variableTreeNode = node as VariableTreeNode; 168 stringBuilder.Append(variableTreeNode.Weight );166 stringBuilder.Append(variableTreeNode.Weight.ToString().Replace(",", ".")); 169 167 stringBuilder.Append("*"); 170 168 stringBuilder.Append(variableTreeNode.VariableName);
Note: See TracChangeset
for help on using the changeset viewer.