Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/10 19:54:20 (14 years ago)
Author:
abeham
Message:

#1090

  • Fixed problem plugins reloading their operators on deserialization in following problems (forgot on them in the first commit)
    • SupportVectorRegressionProblem
    • SymbolicTimeSeriesPrognosisProblem
  • Fixed a bug in the FeatureSelectionProblem introduced in r4098
  • Fixed the issues mentioned in the code review of mkommend
Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/MultiObjectiveSymbolicVectorRegressionProblem.cs

    r4068 r4118  
    6666    #endregion
    6767
     68    [StorableConstructor]
     69    protected MultiObjectiveSymbolicVectorRegressionProblem(bool deserializing) : base(deserializing) { }
    6870    public MultiObjectiveSymbolicVectorRegressionProblem()
    6971      : base() {
     
    7577      Initialize();
    7678    }
    77 
    78     [StorableConstructor]
    79     private MultiObjectiveSymbolicVectorRegressionProblem(bool deserializing) : base() { }
    80 
     79   
    8180    [StorableHook(HookType.AfterDeserialization)]
    8281    private void AfterDeserializationHook() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionProblem.cs

    r4068 r4118  
    119119    }
    120120
    121     private List<IOperator> operators;
    122121    public override IEnumerable<IOperator> Operators {
    123122      get { return operators; }
     
    154153    [Storable]
    155154    private SymbolicVectorRegressionGrammar grammar;
    156 
     155    [Storable]
     156    private List<IOperator> operators;
     157
     158    [StorableConstructor]
     159    protected SymbolicVectorRegressionProblem(bool deserializing) : base(deserializing) { }
    157160    public SymbolicVectorRegressionProblem()
    158161      : base() {
     
    175178      UpdateGrammar();
    176179      UpdateEstimationLimits();
    177       Initialize();
    178     }
    179 
    180     [StorableConstructor]
    181     private SymbolicVectorRegressionProblem(bool deserializing) : base() { }
     180      InitializeOperators();
     181      RegisterParameterEvents();
     182      RegisterParameterValueEvents();
     183    }
    182184
    183185    [StorableHook(HookType.AfterDeserialization)]
    184186    private void AfterDeserializationHook() {
    185       Initialize();
     187      // BackwardsCompatibility3.3
     188      #region Backwards compatible code (remove with 3.4)
     189      if (operators == null) InitializeOperators();
     190      #endregion
     191      RegisterParameterEvents();
     192      RegisterParameterValueEvents();
    186193    }
    187194
    188195    public override IDeepCloneable Clone(Cloner cloner) {
    189196      SymbolicVectorRegressionProblem clone = (SymbolicVectorRegressionProblem)base.Clone(cloner);
    190       clone.Initialize();
     197      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
     198      clone.RegisterParameterEvents();
     199      clone.RegisterParameterValueEvents();
    191200      return clone;
    192201    }
     
    254263    protected void AddOperator(IOperator op) {
    255264      operators.Add(op);
    256     }
    257 
    258     private void Initialize() {
    259       InitializeOperators();
    260       RegisterParameterEvents();
    261       RegisterParameterValueEvents();
    262265    }
    263266
Note: See TracChangeset for help on using the changeset viewer.