Changeset 1112 for trunk/sources/HeuristicLab.ES/ESEditor.cs
- Timestamp:
- 01/12/09 15:45:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ES/ESEditor.cs
r1091 r1112 61 61 : this() { 62 62 ES = es; 63 int dimension = es.ShakingFactors.Length; 64 problemDimensionTextBox.Text = dimension.ToString(); 63 65 } 64 66 … … 268 270 if (ES.ShakingFactors.Length != dim) { 269 271 problemDimensionTextBox.Text = ES.ShakingFactors.Length.ToString(); 272 UpdateLearningRates(); 270 273 } 271 274 Refresh(); … … 287 290 } 288 291 ES.ShakingFactors = shakingFactors; 292 UpdateLearningRates(); 289 293 Refresh(); 294 } 295 } 296 297 private void UpdateLearningRates() { 298 if (ES != null) { 299 int dimension = int.Parse(problemDimensionTextBox.Text); 300 ES.GeneralLearningRate = 1 / Math.Sqrt(2 * dimension); 301 ES.LearningRate = 1 / Math.Sqrt(2 * Math.Sqrt(dimension)); 290 302 } 291 303 }
Note: See TracChangeset
for help on using the changeset viewer.