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