Changeset 8430 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
- Timestamp:
- 08/08/12 14:04:17 (12 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
- Property svn:ignore
-
old new 20 20 bin 21 21 protoc.exe 22 _ReSharper.HeuristicLab.TimeSeries-3.3
-
- Property svn:ignore
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged eligible /branches/Benchmarking/sources/HeuristicLab.Problems.DataAnalysis.Symbolic 6917-7005 /branches/CloningRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Problems.DataAnalysis.Symbolic 5815-6180 /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis.Symbolic 5060 /branches/NET40/sources/HeuristicLab.Problems.DataAnalysis.Symbolic 5138-5162 /branches/ParallelEngine/HeuristicLab.Problems.DataAnalysis.Symbolic 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Problems.DataAnalysis.Symbolic 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Problems.DataAnalysis.Symbolic 6828 /branches/SuccessProgressAnalysis/HeuristicLab.Problems.DataAnalysis.Symbolic 5370-5682 /branches/Trunk/HeuristicLab.Problems.DataAnalysis.Symbolic 6829-6865 /branches/VNS/HeuristicLab.Problems.DataAnalysis.Symbolic 5594-5752 /branches/histogram/HeuristicLab.Problems.DataAnalysis.Symbolic 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
r7842 r8430 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 58 58 StringBuilder strBuilder = new StringBuilder(); 59 59 constants.Clear(); 60 targetCount = 1;61 60 strBuilder.AppendLine(FormatRecursively(symbolicExpressionTree.Root)); 62 61 return strBuilder.ToString(); … … 75 74 strBuilder.Append(FormatRecursively(node.GetSubtree(0))); 76 75 } 76 int i = 1; 77 77 foreach (SymbolicExpressionTreeNode subTree in node.Subtrees.Skip(1)) { 78 FormatSep(node, strBuilder );78 FormatSep(node, strBuilder, i); 79 79 // format the whole subtree 80 80 strBuilder.Append(FormatRecursively(subTree)); 81 i++; 81 82 } 82 83 … … 225 226 } 226 227 227 private void FormatSep(ISymbolicExpressionTreeNode node, StringBuilder strBuilder ) {228 private void FormatSep(ISymbolicExpressionTreeNode node, StringBuilder strBuilder, int step) { 228 229 if (node.Symbol is Addition) { 229 230 strBuilder.Append(" + "); … … 233 234 strBuilder.Append(@" \cdot "); 234 235 } else if (node.Symbol is Division) { 235 if ( node.SubtreeCount <= 2)236 strBuilder.Append(@" }{");236 if (step + 1 == node.SubtreeCount) 237 strBuilder.Append(@"}{"); 237 238 else 238 239 strBuilder.Append(@" }{ \cfrac{ "); … … 326 327 } else if (node.Symbol is Multiplication) { 327 328 } else if (node.Symbol is Division) { 328 if (node.SubtreeCount == 1 || node.SubtreeCount == 2) 329 strBuilder.Append(" } "); 330 for (int i = 2; i < node.SubtreeCount; i++) 329 331 strBuilder.Append(" } "); 330 else331 for (int i = 0; i < node.SubtreeCount; i++) {332 strBuilder.Append(" } ");333 }334 332 } else if (node.Symbol is Average) { 335 333 strBuilder.Append(@" \right) ");
Note: See TracChangeset
for help on using the changeset viewer.