Changeset 14367 for trunk/sources
- Timestamp:
- 10/31/16 19:03:02 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
r14255 r14367 67 67 strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root)); 68 68 return strBuilder.ToString(); 69 } 70 catch (NotImplementedException ex) { 69 } catch (NotImplementedException ex) { 71 70 return ex.Message + Environment.NewLine + ex.StackTrace; 72 71 } … … 109 108 } else if (node.Symbol is Division) { 110 109 if (node.SubtreeCount == 1) { 111 strBuilder.Append(@" \cfrac{1 ");110 strBuilder.Append(@" \cfrac{1}{"); 112 111 } else { 113 112 strBuilder.Append(@" \cfrac{ "); … … 176 175 strBuilder.Append(@" \operatorname{if} \left( "); 177 176 } else if (node.Symbol is Constant) { 178 strBuilder.Append("c_{" + constants.Count + "} ");179 177 var constNode = node as ConstantTreeNode; 180 constants.Add(constNode.Value); 178 if (constNode.Value.IsAlmost(1.0)) { 179 strBuilder.Append("1 "); 180 } else { 181 strBuilder.Append("c_{" + constants.Count + "} "); 182 constants.Add(constNode.Value); 183 } 181 184 } else if (node.Symbol is LaggedVariable) { 182 185 var laggedVarNode = node as LaggedVariableTreeNode;
Note: See TracChangeset
for help on using the changeset viewer.