Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5691 for branches


Ignore:
Timestamp:
03/15/11 15:38:52 (14 years ago)
Author:
mkommend
Message:

#1418: Fixed error in grammars.

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  
    104104      programRootSymbol = new ProgramRootSymbol();
    105105      AddSymbol(programRootSymbol);
     106      SetSubtreeCount(programRootSymbol, 1, 1);
     107
    106108      startSymbol = new StartSymbol();
    107109      AddSymbol(startSymbol);
     110      SetSubtreeCount(startSymbol, 1, 1);
     111
    108112      defunSymbol = new Defun();
    109113      AddSymbol(defunSymbol);
     114      SetSubtreeCount(defunSymbol, 1, 1);
    110115
    111       SetSubtreeCount(programRootSymbol, 1, 1);
    112116      AddAllowedChildSymbol(programRootSymbol, startSymbol, 0);
    113117      UpdateAdfConstraints();
    114 
    115       SetSubtreeCount(defunSymbol, 1, 1);
    116118    }
    117119
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/Grammars.cs

    r5688 r5691  
    9797      protected SimpleArithmeticGrammar(SimpleArithmeticGrammar original, Cloner cloner) : base(original, cloner) { }
    9898      public SimpleArithmeticGrammar()
    99         : base("Grammar for unit tests","") {
     99        : base("Grammar for unit tests", "") {
    100100        Initialize();
    101101      }
     
    123123        SetSubtreeCount(terminal, 0, 0);
    124124
    125         SetSubtreeCount(StartSymbol, 1, 1);
    126125        // allow each symbol as child of the start symbol
    127126        foreach (var symb in allSymbols) {
Note: See TracChangeset for help on using the changeset viewer.