Changeset 14879
- Timestamp:
- 04/19/17 18:49:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.ExpressionGenerator/HeuristicLab.ExpressionGenerator/3.4/ExpressionGenerator.cs
r14873 r14879 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Runtime.InteropServices;26 using HeuristicLab.Common;27 25 using HeuristicLab.Core; 28 26 using HeuristicLab.Random; … … 48 46 49 47 var expTemplate = ExpOfScaledExpression(uniformRandom, Instantiate(prodTemplate, uniformRandom, 100, "prodOfVars"), 50 valueRange: new UniformDistributedRandom(uniformRandom, 1, 4)); // TODO should also specify an offset 48 minValue: new PointDistribution(-3), 49 valueRange: new UniformDistributedRandom(uniformRandom, 4, 6)); 51 50 52 51 var scaledExprTemplate = new ScalingTemplate(new UniformDistributedRandom(uniformRandom, 1, 10)) { Label = "*" }; … … 123 122 /// template scales the argument expression first to guarantee reasonable values 124 123 private static ExpressionTemplate ExpOfScaledExpression(IRandom uniformRandom, IEnumerable<Expression> arguments, 124 IRandom minValue = null, 125 125 IRandom valueRange = null) { 126 var limitToRangeTemplate = new RangeTemplate( null, valueRange);126 var limitToRangeTemplate = new RangeTemplate(minValue, valueRange); 127 127 limitToRangeTemplate.AddArguments(arguments); 128 128
Note: See TracChangeset
for help on using the changeset viewer.