Changeset 16702
- Timestamp:
- 03/21/19 10:21:16 (6 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
r16565 r16702 26 26 using System.Text; 27 27 using System.Text.RegularExpressions; 28 using HEAL.Attic; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; 30 31 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 31 using HEAL.Attic;32 32 33 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 56 56 } 57 57 58 private string VariableName2Identifier(string name) { 58 private string VariableName2Identifier(string name) { 59 59 /* 60 60 * identifier-start-character: … … 131 131 } else if (node.Symbol is Tangent) { 132 132 FormatFunction(node, "Math.Tan", strBuilder); 133 } else if (node.Symbol is HyperbolicTangent) { 134 FormatFunction(node, "Math.Tanh", strBuilder); 133 135 } else if (node.Symbol is Square) { 134 136 FormatSquare(node, strBuilder); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
r16565 r16702 25 25 using System.Linq; 26 26 using System.Text; 27 using HEAL.Attic; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Core; 29 30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HEAL.Attic;31 31 32 32 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 192 192 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 193 193 stringBuilder.Append(")"); 194 194 } else if (symbol is HyperbolicTangent) { 195 stringBuilder.Append("TANH("); 196 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 197 stringBuilder.Append(")"); 195 198 } else if (symbol is Variable) { 196 199 VariableTreeNode variableTreeNode = node as VariableTreeNode; -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
r16565 r16702 24 24 using System.Linq; 25 25 using System.Text; 26 using HEAL.Attic; 26 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Core; 28 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 using HEAL.Attic;30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 137 137 } else if (node.Symbol is Tangent) { 138 138 strBuilder.Append(@"\tan \left( "); 139 } else if (node.Symbol is HyperbolicTangent) { 140 strBuilder.Append(@"\tanh \left( "); 139 141 } else if (node.Symbol is AiryA) { 140 142 strBuilder.Append(@"\operatorname{airy}_a \left( "); … … 303 305 } else if (node.Symbol is Tangent) { 304 306 throw new InvalidOperationException(); 307 } else if (node.Symbol is HyperbolicTangent) { 308 throw new InvalidOperationException(); 305 309 } else if (node.Symbol is AiryA) { 306 310 throw new InvalidOperationException(); … … 399 403 } else if (node.Symbol is Tangent) { 400 404 strBuilder.Append(@" \right) "); 405 } else if (node.Symbol is HyperbolicTangent) { 406 strBuilder.Append(@" \right) "); 401 407 } else if (node.Symbol is AiryA) { 402 408 strBuilder.Append(@" \right) "); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs
r16565 r16702 23 23 using System.Linq; 24 24 using System.Text; 25 using HEAL.Attic; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HEAL.Attic;29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 252 252 } else if (symbol is Tangent) { 253 253 stringBuilder.Append("tan("); 254 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 255 stringBuilder.Append(")"); 256 } else if (symbol is HyperbolicTangent) { 257 stringBuilder.Append("tanh("); 254 258 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 255 259 stringBuilder.Append(")"); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs
r16565 r16702 24 24 using System.Linq; 25 25 using System.Text; 26 using HEAL.Attic; 26 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Core; 28 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 using HEAL.Attic;30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 70 70 } else if (node.Symbol is Tangent) { 71 71 FormatFunction(node, "Tan", strBuilder); 72 } else if (node.Symbol is HyperbolicTangent) { 73 FormatFunction(node, "Tanh", strBuilder); 72 74 } else if (node.Symbol is Exponential) { 73 75 FormatFunction(node, "Exp", strBuilder); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionSmalltalkFormatter.cs
r16565 r16702 160 160 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 161 161 stringBuilder.Append(" tan"); 162 } else if (symbol is HyperbolicTangent) { 163 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 164 stringBuilder.Append(" tanh"); 162 165 } else if (symbol is Variable) { 163 166 VariableTreeNode variableTreeNode = node as VariableTreeNode;
Note: See TracChangeset
for help on using the changeset viewer.