Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters
- Timestamp:
- 05/04/17 17:19:35 (8 years ago)
- Location:
- branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs
r14826 r14927 28 28 using HeuristicLab.Core; 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;30 using HeuristicLab.Persistence; 31 31 32 32 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 34 34 /// Formats mathematical expressions in infix form. E.g. x1 * (3.0 * x2 + x3) 35 35 /// </summary> 36 [Storable Class]36 [StorableType("7f57939a-3dac-48a5-848e-d86aa111b566")] 37 37 [Item("Infix Symbolic Expression Tree Formatter", "A string formatter that converts symbolic expression trees to infix expressions.")] 38 38 -
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
r14826 r14927 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 31 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;31 using HeuristicLab.Persistence; 32 32 33 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 34 34 [Item("C# Symbolic Expression Tree Formatter", "A string formatter that converts symbolic expression trees to C# code.")] 35 [Storable Class]35 [StorableType("837acc55-788b-4a26-9b53-09f7364eb3e4")] 36 36 public sealed class CSharpSymbolicExpressionTreeStringFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 37 37 [StorableConstructor] … … 56 56 } 57 57 58 private string VariableName2Identifier(string name) { 58 private string VariableName2Identifier(string name) { 59 59 /* 60 60 * identifier-start-character: -
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
r14843 r14927 28 28 using HeuristicLab.Core; 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;30 using HeuristicLab.Persistence; 31 31 32 32 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 33 33 [Item("Excel String Formatter", "String formatter for string representations of symbolic data analysis expressions in Excel syntax.")] 34 [Storable Class]34 [StorableType("c655f723-6e1a-4adc-b034-9fee56bd7402")] 35 35 public sealed class SymbolicDataAnalysisExpressionExcelFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 36 36 [StorableConstructor] … … 78 78 } 79 79 80 public string FormatWithMapping(ISymbolicExpressionTree symbolicExpressionTree, Dictionary<string,string> variableNameMapping) 81 { 82 foreach(var kvp in variableNameMapping) this.variableNameMapping.Add(kvp.Key,kvp.Value); 80 public string FormatWithMapping(ISymbolicExpressionTree symbolicExpressionTree, Dictionary<string, string> variableNameMapping) { 81 foreach (var kvp in variableNameMapping) this.variableNameMapping.Add(kvp.Key, kvp.Value); 83 82 var stringBuilder = new StringBuilder(); 84 83 85 84 stringBuilder.Append("="); 86 85 stringBuilder.Append(FormatRecursively(symbolicExpressionTree.Root)); … … 93 92 } 94 93 95 private Dictionary<string, string> CalculateVariableMapping(ISymbolicExpressionTree tree, IDataset dataset) {96 var mapping = new Dictionary<string, string>();94 private Dictionary<string, string> CalculateVariableMapping(ISymbolicExpressionTree tree, IDataset dataset) { 95 var mapping = new Dictionary<string, string>(); 97 96 int inputIndex = 0; 98 97 var usedVariables = tree.IterateNodesPrefix().OfType<IVariableTreeNode>().Select(v => v.VariableName).Distinct().ToArray(); -
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
r14826 r14927 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;29 using HeuristicLab.Persistence; 30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 32 32 [Item("LaTeX String Formatter", "Formatter for symbolic expression trees for import into LaTeX documents.")] 33 [Storable Class]33 [StorableType("93acec5c-38c8-4792-a81a-ccc3873e87e4")] 34 34 public sealed class SymbolicDataAnalysisExpressionLatexFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 35 35 private readonly List<KeyValuePair<string, double>> constants; -
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMATLABFormatter.cs
r14826 r14927 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;28 using HeuristicLab.Persistence; 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 31 31 32 32 [Item("MATLAB String Formatter", "String formatter for string representations of symbolic data analysis expressions in MATLAB syntax.")] 33 [Storable Class]33 [StorableType("710a8cc2-402c-4347-a593-b95c9ee212be")] 34 34 public sealed class SymbolicDataAnalysisExpressionMATLABFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 35 35 private int currentLag; -
branches/PersistenceReintegration/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionMathematicaFormatter.cs
r14826 r14927 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;29 using HeuristicLab.Persistence; 30 30 31 31 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 32 32 [Item("Mathematica Symbolic Expression Tree Formatter", "A string formatter that converts symbolic expression trees to Mathematica expressions.")] 33 [Storable Class]33 [StorableType("9e729bc3-e8ee-4cbe-9a2d-89e44d7dd453")] 34 34 public sealed class SymbolicDataAnalysisExpressionMathematicaFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 35 35 [StorableConstructor]
Note: See TracChangeset
for help on using the changeset viewer.