Changeset 17587 for branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorProblem.cs
- Timestamp:
- 06/04/20 18:16:58 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorProblem.cs
r17544 r17587 22 22 #endregion 23 23 24 using System;25 24 using System.Linq; 26 25 using HEAL.Attic; … … 37 36 public abstract class RealVectorProblem : SingleObjectiveProblem<RealVectorEncoding, RealVector> { 38 37 [Storable] protected ReferenceParameter<IntValue> DimensionRefParameter { get; private set; } 39 public IValueParameter<IntValue> DimensionParameter => DimensionRefParameter;40 38 [Storable] protected ReferenceParameter<DoubleMatrix> BoundsRefParameter { get; private set; } 41 public IValueParameter<DoubleMatrix> BoundsParameter => BoundsRefParameter;42 39 43 40 public int Dimension { … … 48 45 public DoubleMatrix Bounds { 49 46 get { return BoundsRefParameter.Value; } 50 set { Bounds Parameter.Value = value; }47 set { BoundsRefParameter.Value = value; } 51 48 } 52 49 … … 99 96 100 97 private void RegisterEventHandlers() { 101 DimensionRefParameter.Value.ValueChanged += DimensionParameter_Value_ValueChanged; 102 BoundsRefParameter.ValueChanged += BoundsParameter_ValueChanged; 103 } 104 105 private void DimensionParameter_Value_ValueChanged(object sender, EventArgs e) { 106 DimensionOnChanged(); 107 } 108 109 private void BoundsParameter_ValueChanged(object sender, EventArgs e) { 110 BoundsOnChanged(); 98 IntValueParameterChangeHandler.Create(DimensionRefParameter, DimensionOnChanged); 99 DoubleMatrixParameterChangeHandler.Create(BoundsRefParameter, BoundsOnChanged); 111 100 } 112 101
Note: See TracChangeset
for help on using the changeset viewer.