- Timestamp:
- 03/15/11 15:38:52 (14 years ago)
- Location:
- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammar.cs
r5688 r5691 104 104 programRootSymbol = new ProgramRootSymbol(); 105 105 AddSymbol(programRootSymbol); 106 SetSubtreeCount(programRootSymbol, 1, 1); 107 106 108 startSymbol = new StartSymbol(); 107 109 AddSymbol(startSymbol); 110 SetSubtreeCount(startSymbol, 1, 1); 111 108 112 defunSymbol = new Defun(); 109 113 AddSymbol(defunSymbol); 114 SetSubtreeCount(defunSymbol, 1, 1); 110 115 111 SetSubtreeCount(programRootSymbol, 1, 1);112 116 AddAllowedChildSymbol(programRootSymbol, startSymbol, 0); 113 117 UpdateAdfConstraints(); 114 115 SetSubtreeCount(defunSymbol, 1, 1);116 118 } 117 119 -
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/Grammars.cs
r5688 r5691 97 97 protected SimpleArithmeticGrammar(SimpleArithmeticGrammar original, Cloner cloner) : base(original, cloner) { } 98 98 public SimpleArithmeticGrammar() 99 : base("Grammar for unit tests", "") {99 : base("Grammar for unit tests", "") { 100 100 Initialize(); 101 101 } … … 123 123 SetSubtreeCount(terminal, 0, 0); 124 124 125 SetSubtreeCount(StartSymbol, 1, 1);126 125 // allow each symbol as child of the start symbol 127 126 foreach (var symb in allSymbols) {
Note: See TracChangeset
for help on using the changeset viewer.