Changeset 12293 for trunk/sources/HeuristicLab.Optimizer
- Timestamp:
- 04/07/15 15:38:56 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/CreateExperimentDialog.cs
r12012 r12293 264 264 var parameter = (IValueParameter)generateButton.Tag; 265 265 bool integerOnly = intParameters.ContainsKey(parameter); 266 d oublemin = 0, max = 1, step = 1;266 decimal min = 0, max = 1, step = 1; 267 267 #region Try to calculate some meaningful values 268 268 if (integerOnly) { … … 276 276 int len = doubleParameters[parameter].Length; 277 277 if (len > 0) { 278 min = doubleParameters[parameter].Min();279 max = doubleParameters[parameter].Max();280 step = len >= 2 ? Math.Abs(( doubleParameters[parameter][len - 1] - doubleParameters[parameter][len - 2])) : 1;278 min = (decimal)doubleParameters[parameter].Min(); 279 max = (decimal)doubleParameters[parameter].Max(); 280 step = len >= 2 ? Math.Abs(((decimal)doubleParameters[parameter][len - 1] - (decimal)doubleParameters[parameter][len - 2])) : 1m; 281 281 } 282 282 } … … 292 292 } else { 293 293 doubleParameters[parameter].Reset -= new EventHandler(ValuesArray_Reset); 294 doubleParameters[parameter] = new DoubleArray(values. ToArray());294 doubleParameters[parameter] = new DoubleArray(values.Select(x => (double)x).ToArray()); 295 295 doubleParameters[parameter].Reset += new EventHandler(ValuesArray_Reset); 296 296 stringConvertibleArrayView.Content = doubleParameters[parameter];
Note: See TracChangeset
for help on using the changeset viewer.