Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/11 14:42:45 (14 years ago)
Author:
mkommend
Message:

#1418: Adapted new ProblemData classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationProblem.cs

    r5577 r5579  
    2020#endregion
    2121
    22 using System;
    2322using HeuristicLab.Common;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Parameters;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2725
     
    3028  [Item("ClassificationProblem", "")]
    3129  [Creatable]
    32   public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>,
    33     IClassificationProblem {
    34     private const string ProblemDataParameterName = "ProblemData";
    35     public ClassificationProblem(ClassificationProblem original, Cloner cloner)
    36       : base(original, cloner) {
    37       RegisterEventHandlers();
    38     }
     30  public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem {
    3931    [StorableConstructor]
    4032    public ClassificationProblem(bool deserializing) : base(deserializing) { }
     33    public ClassificationProblem(ClassificationProblem original, Cloner cloner) : base(original, cloner) { }
     34    public override IDeepCloneable Clone(Cloner cloner) { return new ClassificationProblem(this, cloner); }
     35
    4136    public ClassificationProblem()
    4237      : base() {
    43       Parameters.Add(new ValueParameter<IClassificationProblemData>(ProblemDataParameterName, "", new ClassificationProblemData()));
    44       RegisterEventHandlers();
     38      ProblemData = new ClassificationProblemData();
    4539    }
    46 
    47     [StorableHook(HookType.AfterDeserialization)]
    48     private void AfterDeserialization() {
    49       RegisterEventHandlers();
    50     }
    51 
    52     public override IDeepCloneable Clone(Cloner cloner) {
    53       return new ClassificationProblem(this, cloner);
    54     }
    55 
    56     private void RegisterEventHandlers() {
    57       ProblemDataParameter.Value.Changed += new EventHandler(Value_Changed);
    58     }
    59 
    60     #region event propagation
    61     private void Value_Changed(object sender, EventArgs e) {
    62       //OnReset();
    63     }
    64     #endregion
    6540  }
    6641}
Note: See TracChangeset for help on using the changeset viewer.