Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/ErcOption.cs @ 17714

Last change on this file since 17714 was 14952, checked in by pkimmesw, 8 years ago

#2665 Added IsNoop to Expression, Made Expressions storable, Fixed Debugger, Fixed and improved problem data and result visualisation, Added custom ErcOption view, Added problem difficulty to problem data name

File size: 820 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 WeightedErcItem<T>[0]) { }
9
10    protected ErcOption(bool isEnabled, params WeightedErcItem<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.