- Timestamp:
- 06/21/13 21:04:20 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeGraphvizFormatter.cs
r9648 r9649 51 51 } 52 52 53 public string Format( SymbolicExpressionTree symbolicExpressionTree) {53 public string Format(ISymbolicExpressionTree symbolicExpressionTree) { 54 54 int nodeCounter = 1; 55 55 StringBuilder strBuilder = new StringBuilder(); … … 60 60 } 61 61 62 private string FormatRecursively( SymbolicExpressionTreeNode node, int indentLength, ref int nodeId) {62 private string FormatRecursively(ISymbolicExpressionTreeNode node, int indentLength, ref int nodeId) { 63 63 // save id of current node 64 64 int currentNodeId = nodeId; … … 77 77 strBuilder.Append("node" + currentNodeId + "[label=\"" + nodeLabel + "\""); 78 78 // leaf nodes should have box shape 79 if (node.Sub Trees.Count == 0) {79 if (node.SubtreeCount == 0) { 80 80 strBuilder.AppendLine(", shape=\"box\"];"); 81 81 } else { … … 84 84 85 85 // internal nodes or leaf nodes? 86 foreach ( SymbolicExpressionTreeNode subTree in node.SubTrees) {86 foreach (ISymbolicExpressionTreeNode subTree in node.Subtrees) { 87 87 // add an edge 88 88 if (Indent) strBuilder.Append(' ', indentLength); -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Formatters/SymbolicExpressionTreeStringFormatter.cs
r9456 r9649 28 28 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 29 29 30 [Item(" SymbolicExpressionTreeStringFormatter", "The default string formatter for symbolic expression trees.")]30 [Item("Default String Formatter", "The default string formatter for symbolic expression trees.")] 31 31 [StorableClass] 32 32 public class SymbolicExpressionTreeStringFormatter : NamedItem, ISymbolicExpressionTreeStringFormatter { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
r9530 r9649 132 132 </Compile> 133 133 <Compile Include="Creators\RampedHalfAndHalfTreeCreator.cs" /> 134 <Compile Include="Formatters\SymbolicExpressionTreeGraphvizFormatter.cs" /> 134 135 <Compile Include="Interfaces\IReadOnlySymbol.cs" /> 135 136 <Compile Include="Interfaces\ISymbolicExpressionGrammar.cs" />
Note: See TracChangeset
for help on using the changeset viewer.