Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/20 14:41:43 (5 years ago)
Author:
abeham
Message:

#2521: work in progress

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  
    4444      set {
    4545        if (Length == value) return;
    46         LengthParameter.ForceValue(new IntValue(value, @readonly: LengthParameter.Value.ReadOnly));
     46        LengthParameter.Value = new IntValue(value, @readonly: LengthParameter.Value.ReadOnly);
    4747      }
    4848    }
     
    107107
    108108    public override void ConfigureOperators(IEnumerable<IItem> operators) {
     109      base.ConfigureOperators(operators);
    109110      ConfigureCreators(operators.OfType<IBinaryVectorCreator>());
    110111      ConfigureCrossovers(operators.OfType<IBinaryVectorCrossover>());
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorMultiObjectiveProblem.cs

    r17545 r17567  
    3737
    3838    public int Dimension {
    39       get { return Encoding.Length; }
    40       set { Encoding.Length = value; }
     39      get { return DimensionRefParameter.Value.Value; }
    4140    }
    4241
     
    9089
    9190    private void RegisterEventHandlers() {
    92       Encoding.PropertyChanged += (sender, args) => {
    93         if (args.PropertyName == nameof(Encoding.Length))
    94           DimensionOnChanged();
    95       };
     91      IntValueParameterChangeHandler.Create(DimensionRefParameter, DimensionOnChanged);
    9692    }
    9793
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorProblem.cs

    r17544 r17567  
    1 
    2 #region License Information
     1#region License Information
    32/* HeuristicLab
    43 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    3938
    4039    public int Dimension {
    41       get { return Encoding.Length; }
    42       set { Encoding.Length = value; }
     40      get { return DimensionRefParameter.Value.Value; }
    4341    }
    4442
     
    8684
    8785    private void RegisterEventHandlers() {
    88       Encoding.PropertyChanged += (sender, args) => {
    89         if (args.PropertyName == nameof(Encoding.Length))
    90           DimensionOnChanged();
    91       };
     86      IntValueParameterChangeHandler.Create(DimensionRefParameter, DimensionOnChanged);
    9287    }
    9388
Note: See TracChangeset for help on using the changeset viewer.