Changeset 12466 for branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs
- Timestamp:
- 06/18/15 11:17:50 (9 years ago)
- Location:
- branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer
- Property svn:mergeinfo changed
-
branches/EnumValue in CreateExperiment/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs
r12268 r12466 286 286 var parameter = (IValueParameter)generateButton.Tag; 287 287 bool integerOnly = intParameters.ContainsKey(parameter); 288 d oublemin = 0, max = 1, step = 1;288 decimal min = 0, max = 1, step = 1; 289 289 #region Try to calculate some meaningful values 290 290 if (integerOnly) { … … 298 298 int len = doubleParameters[parameter].Length; 299 299 if (len > 0) { 300 min = doubleParameters[parameter].Min();301 max = doubleParameters[parameter].Max();302 step = len >= 2 ? Math.Abs(( doubleParameters[parameter][len - 1] - doubleParameters[parameter][len - 2])) : 1;300 min = (decimal)doubleParameters[parameter].Min(); 301 max = (decimal)doubleParameters[parameter].Max(); 302 step = len >= 2 ? Math.Abs(((decimal)doubleParameters[parameter][len - 1] - (decimal)doubleParameters[parameter][len - 2])) : 1m; 303 303 } 304 304 } … … 314 314 } else { 315 315 doubleParameters[parameter].Reset -= new EventHandler(ValuesArray_Reset); 316 doubleParameters[parameter] = new DoubleArray(values. ToArray());316 doubleParameters[parameter] = new DoubleArray(values.Select(x => (double)x).ToArray()); 317 317 doubleParameters[parameter].Reset += new EventHandler(ValuesArray_Reset); 318 318 stringConvertibleArrayView.Content = doubleParameters[parameter];
Note: See TracChangeset
for help on using the changeset viewer.