Changeset 17518


Ignore:
Timestamp:
04/27/20 14:02:29 (3 months ago)
Author:
mkommend
Message:

#2521: Added ctor in implementations of data analysis problems and sealed the basic versions.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs

    r17515 r17518  
    2727  [StorableType("93696570-A410-4885-A210-7220771B6050")]
    2828  [Item("Classification Problem", "A general classification problem.")]
    29   public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent {
    30     public string Filename { get; set; }
    31 
     29  public sealed class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent {
    3230    [StorableConstructor]
    33     protected ClassificationProblem(StorableConstructorFlag _) : base(_) { }
    34     protected ClassificationProblem(ClassificationProblem original, Cloner cloner) : base(original, cloner) { }
     31    private ClassificationProblem(StorableConstructorFlag _) : base(_) { }
     32    private ClassificationProblem(ClassificationProblem original, Cloner cloner) : base(original, cloner) { }
    3533    public override IDeepCloneable Clone(Cloner cloner) { return new ClassificationProblem(this, cloner); }
    3634
    3735    public ClassificationProblem() : base(new ClassificationProblemData()) { }
     36    public ClassificationProblem(IClassificationProblemData problemData) : base(problemData) { }
     37
    3838  }
    3939}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs

    r17226 r17518  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    24 using HEAL.Attic;
    2525
    2626namespace HeuristicLab.Problems.DataAnalysis {
    2727  [StorableType("CB64B930-3C95-4663-B583-712B42E33712")]
    2828  [Item("Clustering Problem", "A general clustering problem.")]
    29   public class ClusteringProblem : DataAnalysisProblem<IClusteringProblemData>, IClusteringProblem {
     29  public sealed class ClusteringProblem : DataAnalysisProblem<IClusteringProblemData>, IClusteringProblem {
    3030    [StorableConstructor]
    31     protected ClusteringProblem(StorableConstructorFlag _) : base(_) { }
    32     protected ClusteringProblem(ClusteringProblem original, Cloner cloner) : base(original, cloner) { }
     31    private ClusteringProblem(StorableConstructorFlag _) : base(_) { }
     32    private ClusteringProblem(ClusteringProblem original, Cloner cloner) : base(original, cloner) { }
    3333    public override IDeepCloneable Clone(Cloner cloner) { return new ClusteringProblem(this, cloner); }
    3434
    3535    public ClusteringProblem() : base(new ClusteringProblemData()) { }
     36    public ClusteringProblem(IClusteringProblemData problemData) : base(problemData) { }
    3637  }
    3738}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs

    r17226 r17518  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    24 using HEAL.Attic;
    2525
    2626namespace HeuristicLab.Problems.DataAnalysis {
    2727  [StorableType("BD8AFF60-E8BE-4325-B1AC-08B7BDF37865")]
    2828  [Item("Regression Problem", "A general regression problem.")]
    29   public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, IRegressionProblem, IStorableContent {
    30     public string Filename { get; set; }
    31 
     29  public sealed class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, IRegressionProblem, IStorableContent {
    3230    [StorableConstructor]
    33     protected RegressionProblem(StorableConstructorFlag _) : base(_) { }
    34     protected RegressionProblem(RegressionProblem original, Cloner cloner) : base(original, cloner) { }
     31    private RegressionProblem(StorableConstructorFlag _) : base(_) { }
     32    private RegressionProblem(RegressionProblem original, Cloner cloner) : base(original, cloner) { }
    3533    public override IDeepCloneable Clone(Cloner cloner) { return new RegressionProblem(this, cloner); }
    3634
    3735    public RegressionProblem() : base(new RegressionProblemData()) { }
    38 
     36    public RegressionProblem(IRegressionProblemData problemData) : base(problemData) { }
    3937  }
    4038}
Note: See TracChangeset for help on using the changeset viewer.