Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/18/19 13:23:10 (6 years ago)
Author:
mkommend
Message:

#2521: Changed base ctor call in all GeneticProgrammingProblems.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs

    r16723 r16813  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    2829using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2930using HeuristicLab.Parameters;
    30 using HEAL.Attic;
    3131
    3232
     
    7878
    7979    public EvenParityProblem()
    80       : base() {
     80      : base(new SymbolicExpressionTreeEncoding()) {
    8181      Parameters.Add(new FixedValueParameter<IntValue>(NumberOfBitsParameterName, "The number of bits for the input parameter for the even parity function", new IntValue(4)));
    8282
    83       var g = new SimpleSymbolicExpressionGrammar(); // will be replaced in update grammar
    84       Encoding = new SymbolicExpressionTreeEncoding(g, 100, 17);
     83      Encoding.TreeLength = 100;
     84      Encoding.TreeDepth = 17;
    8585
    8686      UpdateGrammar();
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs

    r16723 r16813  
    2424using System.Diagnostics.Contracts;
    2525using System.Linq;
     26using HEAL.Attic;
    2627using HeuristicLab.Common;
    2728using HeuristicLab.Core;
     
    2930using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    3031using HeuristicLab.Parameters;
    31 using HEAL.Attic;
    3232
    3333
     
    8181
    8282    public MultiplexerProblem()
    83       : base() {
     83      : base(new SymbolicExpressionTreeEncoding()) {
    8484      Parameters.Add(new FixedValueParameter<IntValue>(NumberOfBitsParameterName,
    8585        "The number of bits for the input parameter for the multiplexer function. This is the sum of the number of address bits and the number of input lines. E.g. the 11-MUX has 3 address bits and 8 input lines",
    8686        new IntValue(11)));
    8787
    88       var g = new SimpleSymbolicExpressionGrammar(); // will be replaced in update grammar
    89       Encoding = new SymbolicExpressionTreeEncoding(g, 100, 17);
    90 
     88      Encoding.TreeLength = 100;
     89      Encoding.TreeDepth = 17;
    9190      UpdateGrammar();
    9291      RegisterEventHandlers();
Note: See TracChangeset for help on using the changeset viewer.