Changeset 11638 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Timestamp:
- 12/03/14 17:04:46 (10 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views merged: 11623
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj
r10524 r11638 11 11 <RootNamespace>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views</RootNamespace> 12 12 <AssemblyName>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</AssemblyName> 13 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>13 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 14 14 <TargetFrameworkProfile> 15 15 </TargetFrameworkProfile> … … 46 46 <WarningLevel>4</WarningLevel> 47 47 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 48 <Prefer32Bit>false</Prefer32Bit> 48 49 </PropertyGroup> 49 50 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 55 56 <WarningLevel>4</WarningLevel> 56 57 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 58 <Prefer32Bit>false</Prefer32Bit> 57 59 </PropertyGroup> 58 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> … … 64 66 <ErrorReport>prompt</ErrorReport> 65 67 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 68 <Prefer32Bit>false</Prefer32Bit> 66 69 </PropertyGroup> 67 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> … … 73 76 <ErrorReport>prompt</ErrorReport> 74 77 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 78 <Prefer32Bit>false</Prefer32Bit> 75 79 </PropertyGroup> 76 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> … … 82 86 <ErrorReport>prompt</ErrorReport> 83 87 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 88 <Prefer32Bit>false</Prefer32Bit> 84 89 </PropertyGroup> 85 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> … … 91 96 <ErrorReport>prompt</ErrorReport> 92 97 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 98 <Prefer32Bit>false</Prefer32Bit> 93 99 </PropertyGroup> 94 100 <ItemGroup> -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r11208 r11638 49 49 this.lineColor = Color.Black; 50 50 this.backgroundColor = Color.White; 51 this.textFont = new Font(FontFamily.GenericSansSerif, 10);51 this.textFont = new Font(FontFamily.GenericSansSerif, 8); 52 52 53 53 visualTreeNodes = new Dictionary<ISymbolicExpressionTreeNode, VisualTreeNode<ISymbolicExpressionTreeNode>>(); … … 336 336 } 337 337 //draw name of symbol 338 var text = node.ToString();338 var text = ShortLabel(node); 339 339 graphics.DrawString(text, textFont, textBrush, new RectangleF(visualTreeNode.X, visualTreeNode.Y, visualTreeNode.Width, visualTreeNode.Height), stringFormat); 340 340 } … … 423 423 Repaint(); 424 424 } 425 426 private static string ShortLabel(ISymbolicExpressionTreeNode node) { 427 var name = node.ToString(); 428 429 if (node.SubtreeCount > 0) { 430 switch (name) { 431 case "Addition": 432 return "Add"; 433 case "Subtraction": 434 return "Sub"; 435 case "Multiplication": 436 return "Mul"; 437 case "Division": 438 return "Div"; 439 case "Exponential": 440 return "Exp"; 441 case "Logarithm": 442 return "Log"; 443 } 444 } 445 446 return name; 447 } 425 448 } 426 449 }
Note: See TracChangeset
for help on using the changeset viewer.