- Timestamp:
- 05/28/20 14:41:43 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorEncoding.cs
r17546 r17567 44 44 set { 45 45 if (Length == value) return; 46 LengthParameter. ForceValue(new IntValue(value, @readonly: LengthParameter.Value.ReadOnly));46 LengthParameter.Value = new IntValue(value, @readonly: LengthParameter.Value.ReadOnly); 47 47 } 48 48 } … … 107 107 108 108 public override void ConfigureOperators(IEnumerable<IItem> operators) { 109 base.ConfigureOperators(operators); 109 110 ConfigureCreators(operators.OfType<IBinaryVectorCreator>()); 110 111 ConfigureCrossovers(operators.OfType<IBinaryVectorCrossover>()); -
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorMultiObjectiveProblem.cs
r17545 r17567 37 37 38 38 public int Dimension { 39 get { return Encoding.Length; } 40 set { Encoding.Length = value; } 39 get { return DimensionRefParameter.Value.Value; } 41 40 } 42 41 … … 90 89 91 90 private void RegisterEventHandlers() { 92 Encoding.PropertyChanged += (sender, args) => { 93 if (args.PropertyName == nameof(Encoding.Length)) 94 DimensionOnChanged(); 95 }; 91 IntValueParameterChangeHandler.Create(DimensionRefParameter, DimensionOnChanged); 96 92 } 97 93 -
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorProblem.cs
r17544 r17567 1 2 #region License Information 1 #region License Information 3 2 /* HeuristicLab 4 3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) … … 39 38 40 39 public int Dimension { 41 get { return Encoding.Length; } 42 set { Encoding.Length = value; } 40 get { return DimensionRefParameter.Value.Value; } 43 41 } 44 42 … … 86 84 87 85 private void RegisterEventHandlers() { 88 Encoding.PropertyChanged += (sender, args) => { 89 if (args.PropertyName == nameof(Encoding.Length)) 90 DimensionOnChanged(); 91 }; 86 IntValueParameterChangeHandler.Create(DimensionRefParameter, DimensionOnChanged); 92 87 } 93 88
Note: See TracChangeset
for help on using the changeset viewer.