Changeset 18132 for trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs
- Timestamp:
- 12/15/21 11:50:57 (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol (added) merged: 18091,18093,18100,18112-18121,18123-18131
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Tests
- Property svn:mergeinfo changed
/branches/3140_NumberSymbol/HeuristicLab.Tests (added) merged: 18119-18120,18123,18126-18127,18131
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs
r17180 r18132 35 35 varNode.Weight = twister.NextDouble() * 20.0 - 10.0; 36 36 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; 40 40 } 41 41 } … … 44 44 45 45 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); 47 47 } 48 48 49 49 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) { 52 51 foreach (Variable variableSymbol in grammar.Symbols.OfType<Variable>()) { 53 52 variableSymbol.VariableNames = dataset.VariableNames.Skip(1);
Note: See TracChangeset
for help on using the changeset viewer.