Changeset 14569


Ignore:
Timestamp:
01/14/17 19:17:46 (3 years ago)
Author:
gkronber
Message:

#2692: merged r14367 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs

    r14309 r14569  
    6767        strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root));
    6868        return strBuilder.ToString();
    69       }
    70       catch (NotImplementedException ex) {
     69      } catch (NotImplementedException ex) {
    7170        return ex.Message + Environment.NewLine + ex.StackTrace;
    7271      }
     
    109108      } else if (node.Symbol is Division) {
    110109        if (node.SubtreeCount == 1) {
    111           strBuilder.Append(@" \cfrac{1");
     110          strBuilder.Append(@" \cfrac{1}{");
    112111        } else {
    113112          strBuilder.Append(@" \cfrac{ ");
     
    176175        strBuilder.Append(@" \operatorname{if}  \left( ");
    177176      } else if (node.Symbol is Constant) {
    178         strBuilder.Append("c_{" + constants.Count + "} ");
    179177        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        }
    181184      } else if (node.Symbol is LaggedVariable) {
    182185        var laggedVarNode = node as LaggedVariableTreeNode;
Note: See TracChangeset for help on using the changeset viewer.