Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/15/21 11:50:57 (3 years ago)
Author:
gkronber
Message:

#3140: merged r18091:18131 from branch to trunk

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/HeuristicLab.Tests

  • trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs

    r17180 r18132  
    3535          varNode.Weight = twister.NextDouble() * 20.0 - 10.0;
    3636          varNode.VariableName = varNames[twister.Next(varNames.Count)];
    37         } else if (node is ConstantTreeNode) {
    38           var constantNode = node as ConstantTreeNode;
    39           constantNode.Value = twister.NextDouble() * 20.0 - 10.0;
     37        } else if (node is NumberTreeNode) {
     38          var numNode = node as NumberTreeNode;
     39          numNode.Value = twister.NextDouble() * 20.0 - 10.0;
    4040        }
    4141      }
     
    4444
    4545    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar, int popSize) {
    46       return CreateRandomTrees(twister, dataset, grammar, popSize, 1, 200, 3, 3);
     46      return CreateRandomTrees(twister, dataset, grammar, popSize, 200);
    4747    }
    4848
    4949    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar,
    50       int popSize, int minSize, int maxSize,
    51       int maxFunctionDefinitions, int maxFunctionArguments) {
     50      int popSize, int maxSize) {
    5251      foreach (Variable variableSymbol in grammar.Symbols.OfType<Variable>()) {
    5352        variableSymbol.VariableNames = dataset.VariableNames.Skip(1);
Note: See TracChangeset for help on using the changeset viewer.