Changeset 4900 for branches/DataAnalysis.Extensions
- Timestamp:
- 11/22/10 11:09:28 (14 years ago)
- Location:
- branches/DataAnalysis.Extensions
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.Extensions/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.3
- Property svn:ignore
-
old new 1 1 HeuristicLabEncodingsSymbolicExpressionTreeEncodingViewsPlugin.cs 2 bin 3 obj
-
- Property svn:ignore
-
branches/DataAnalysis.Extensions/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3
- Property svn:ignore
-
old new 1 1 HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs 2 bin 3 obj
-
- Property svn:ignore
-
branches/DataAnalysis.Extensions/HeuristicLab.Problems.DataAnalysis/3.3
- Property svn:ignore
-
old new 1 1 HeuristicLabProblemsDataAnalysisPlugin.cs 2 bin 3 *.user 4 obj
-
- Property svn:ignore
-
branches/DataAnalysis.Extensions/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj
r4864 r4900 1 <?xml version="1.0" encoding="utf-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup> … … 198 198 <Compile Include="SupportVectorMachine\SupportVectorMachineUtil.cs" /> 199 199 <Compile Include="Symbolic\ArithmeticExpressionGrammar.cs" /> 200 <Compile Include="Symbolic\Formatters\SymbolicExpressionTreeGraphvizFormatter.cs" /> 201 <Compile Include="Symbolic\Formatters\SymbolicExpressionTreeLatexFormatter.cs" /> 200 202 <Compile Include="Symbolic\Formatters\SymbolicExpressionTreeSmalltalkStringFormatter.cs" /> 201 203 <Compile Include="Symbolic\FullFunctionalExpressionGrammar.cs" /> -
branches/DataAnalysis.Extensions/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs
r4878 r4900 24 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 25 using System.Collections.Generic; 26 using HeuristicLab.Core; 27 using HeuristicLab.Common; 26 28 27 namespace HeuristicLab.Problems.DataAnalysis. Views.Symbolic{29 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Formatters { 28 30 [StorableClass] 29 public class SymbolicExpressionTreeGraphvizFormatter { 31 [Item("SymbolicExpressionTreeGraphvizFormatter", "Formatter for symbolic expression trees for import into GraphViz documents.")] 32 public sealed class SymbolicExpressionTreeGraphvizFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 30 33 [Storable] 31 34 public bool Indent { get; set; } … … 55 58 56 59 60 [StorableConstructor] 61 private SymbolicExpressionTreeGraphvizFormatter(bool deserializing) : base(deserializing) { } 57 62 public SymbolicExpressionTreeGraphvizFormatter() 58 : base( ) {63 : base("SymbolicExpressionTreeLatexFormatter", "Formatter for symbolic expression trees for import into LaTeX documents.") { 59 64 Indent = true; 65 } 66 private SymbolicExpressionTreeGraphvizFormatter(SymbolicExpressionTreeGraphvizFormatter original, Cloner cloner) 67 : base(original, cloner) { 68 this.Indent = original.Indent; 69 } 70 71 public override IDeepCloneable Clone(Cloner cloner) { 72 return new SymbolicExpressionTreeGraphvizFormatter(this, cloner); 60 73 } 61 74 -
branches/DataAnalysis.Extensions/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Formatters/SymbolicExpressionTreeLatexFormatter.cs
r4878 r4900 28 28 using System; 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; 30 using HeuristicLab.Core; 31 using HeuristicLab.Common; 30 32 31 namespace HeuristicLab.Problems.DataAnalysis.Views.Symbolic { 32 public class SymbolicExpressionTreeLatexFormatter { 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Formatters { 34 [Item("SymbolicExpressionTreeLatexFormatter", "Formatter for symbolic expression trees for import into LaTeX documents.")] 35 public sealed class SymbolicExpressionTreeLatexFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { 36 [StorableConstructor] 37 private SymbolicExpressionTreeLatexFormatter(bool deserializing) : base(deserializing) { } 33 38 public SymbolicExpressionTreeLatexFormatter() 34 : base() { } 39 : base("SymbolicExpressionTreeLatexFormatter", "Formatter for symbolic expression trees for import into LaTeX documents.") { } 40 private SymbolicExpressionTreeLatexFormatter(SymbolicExpressionTreeLatexFormatter original, Cloner cloner) : base(original, cloner) { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new SymbolicExpressionTreeLatexFormatter(this, cloner); 44 } 35 45 36 46 public string Format(SymbolicExpressionTree symbolicExpressionTree) { … … 77 87 } else if (node.Symbol is Constant) { 78 88 strBuilder.Append(" c "); 79 } else if (node.Symbol is Variable) {89 } else if (node.Symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable) { 80 90 var varNode = node as VariableTreeNode; 81 strBuilder.Append(" " + varNode.ToString() + " ");91 strBuilder.Append(" " + varNode.ToString() + " "); 82 92 } else if (node.Symbol is ProgramRootSymbol) { 83 93 } else if (node.Symbol is Defun) { … … 89 99 } else if (node.Symbol is StartSymbol) { 90 100 strBuilder.Append("Result & = & "); 91 } else if (node.Symbol is Argument) {101 } else if (node.Symbol is Argument) { 92 102 var argSym = node.Symbol as Argument; 93 strBuilder.Append(" ARG+" +argSym.ArgumentIndex+" ");103 strBuilder.Append(" ARG+" + argSym.ArgumentIndex + " "); 94 104 } else { 95 105 throw new NotImplementedException("Export of " + node.Symbol + " is not implemented."); … … 126 136 strBuilder.Append(" } "); 127 137 } else if (node.Symbol is Constant) { 128 } else if (node.Symbol is Variable) {138 } else if (node.Symbol is HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable) { 129 139 } else if (node.Symbol is ProgramRootSymbol) { 130 140 } else if (node.Symbol is Defun) {
Note: See TracChangeset
for help on using the changeset viewer.