Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/ErcOption.cs @ 14905

Last change on this file since 14905 was 14905, checked in by pkimmesw, 7 years ago

#2665 Made ErcOptions checkable

File size: 832 bytes
Line 
1namespace HeuristicLab.Problems.ProgramSynthesis.Base.Erc {
2  using HeuristicLab.Common;
3  using HeuristicLab.Core;
4  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6  [StorableClass]
7  public abstract class ErcOption<T> : ErcOptionConvertible<T, T> {
8    protected ErcOption() : this(false, new IWeightedErcValueItem<T>[0]) { }
9
10    protected ErcOption(bool isEnabled, params IWeightedErcValueItem<T>[] values)
11        : base(isEnabled, values) { }
12
13    [StorableConstructor]
14    protected ErcOption(bool deserializing)
15        : base(deserializing) {
16    }
17
18    protected ErcOption(ErcOptionConvertible<T, T> origin, Cloner cloner)
19        : base(origin, cloner) {
20    }
21
22    public override T GetErcValue(IRandom random) {
23      return GetErcValue(random, x => x);
24    }
25  }
26}
Note: See TracBrowser for help on using the repository browser.