Changeset 15273 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/LinearCodeGenerator.cs
- Timestamp:
- 07/19/17 12:55:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Generators/CodeGenerator/LinearCodeGenerator.cs
r14834 r15273 31 31 IManagedPool<PooledList<Expression>> expressionListPool = null, 32 32 IRandom random = null, 33 IReadOnlyPushConfiguration pushConfiguration= null,33 IReadOnlyPushConfiguration config = null, 34 34 IDictionary<string, Expression> customExpressions = null) { 35 35 if (maxPoints == 0) 36 36 return new Expression[0]; 37 37 38 random = random ?? new FastRandom();39 pushConfiguration = pushConfiguration?? new PushConfiguration();38 random = random ?? new MersenneTwister(); 39 config = config ?? new PushConfiguration(); 40 40 41 41 var size = maxPoints <= 1 ? 1 : random.Next(1, maxPoints); … … 43 43 44 44 for (var i = 0; i < size; i++) { 45 var expression = CodeGeneratorUtils. CreateExpressionOrErc(45 var expression = CodeGeneratorUtils.MapToExpression( 46 46 random, 47 pushConfiguration.EnabledExpressions,48 pushConfiguration.ErcOptions,47 config.ErcOptions, 48 config, 49 49 customExpressions); 50 50
Note: See TracChangeset
for help on using the changeset viewer.