Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/AlgorithmProblemItem.cs @ 16574

Last change on this file since 16574 was 16574, checked in by gkronber, 6 years ago

#2520: changed HeuristicLab.MetaOptimization addon to compile with new HL.Persistence

File size: 1.3 KB
Line 
1using HeuristicLab.Common;
2using HeuristicLab.Core;
3using HeuristicLab.Optimization;
4using HeuristicLab.Parameters;
5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
6using HEAL.Attic;
7
8namespace HeuristicLab.Problems.MetaOptimization {
9  [StorableType("4A2B5B18-F678-45FE-B59E-06BD79F5982A")]
10  public class AlgorithmProblemItem : ParameterizedNamedItem {
11    #region Parameter Properties
12    public IValueParameter<IAlgorithm> AlgorithmParameter {
13      get { return (ValueParameter<IAlgorithm>)Parameters["Algorithm"]; }
14    }
15    public IValueParameter<IProblem> ProblemParameter {
16      get { return (ValueParameter<IProblem>)Parameters["Problem"]; }
17    }
18    #endregion
19
20    #region Constructors and Cloning
21    [StorableConstructor]
22    protected AlgorithmProblemItem(StorableConstructorFlag _) : base(_) { }
23    public AlgorithmProblemItem() {
24      this.Parameters.Add(new ValueParameter<IAlgorithm>("Algorithm"));
25      this.Parameters.Add(new ValueParameter<IProblem>("Problem"));
26    }
27    protected AlgorithmProblemItem(AlgorithmProblemItem original, Cloner cloner)
28      : base(original, cloner) {
29    }
30    public override IDeepCloneable Clone(Cloner cloner) {
31      return new AlgorithmProblemItem(this, cloner);
32    }
33    #endregion
34  }
35}
Note: See TracBrowser for help on using the repository browser.