- Timestamp:
- 10/23/16 09:22:49 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs
r14347 r14350 110 110 } else { 111 111 // no subtrees 112 if (node.Symbol is Variable) { 112 if (node.Symbol is LaggedVariable) { 113 var varNode = node as LaggedVariableTreeNode; 114 if (!varNode.Weight.IsAlmost(1.0)) { 115 strBuilder.Append("("); 116 strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", varNode.Weight); 117 strBuilder.Append("*"); 118 } 119 strBuilder.Append("LAG("); 120 if (varNode.VariableName.Contains("'")) { 121 strBuilder.AppendFormat("\"{0}\"", varNode.VariableName); 122 } else { 123 strBuilder.AppendFormat("'{0}'", varNode.VariableName); 124 } 125 strBuilder.Append(", ") 126 .AppendFormat(CultureInfo.InvariantCulture, "{0}", varNode.Lag) 127 .Append(")"); 128 } else if (node.Symbol is Variable) { 113 129 var varNode = node as VariableTreeNode; 114 130 if (!varNode.Weight.IsAlmost(1.0)) { … … 130 146 strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", constNode.Value); 131 147 else 132 strBuilder.AppendFormat(CultureInfo.InvariantCulture, "({0})", constNode.Value); // (-1)148 strBuilder.AppendFormat(CultureInfo.InvariantCulture, "({0})", constNode.Value); // (-1 133 149 } 134 150 }
Note: See TracChangeset
for help on using the changeset viewer.