Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis.Base/Erc/FloatVector/FloatVectorConstantsErcValue.cs @ 14898

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

#2665 Set name properties of ERC values

File size: 1.1 KB
Line 
1using System.Linq;
2
3namespace HeuristicLab.Problems.ProgramSynthesis.Base.Erc.FloatVector {
4  using HeuristicLab.Common;
5  using HeuristicLab.Data;
6  using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7
8  [StorableClass]
9  public class FloatVectorConstantsErcValue : VectorConstantsErcValue<double, DoubleArray> {
10    public FloatVectorConstantsErcValue() : this(new double[0][]) { }
11
12    public FloatVectorConstantsErcValue(params double[][] values)
13      : this(true, values) {
14    }
15
16    public FloatVectorConstantsErcValue(bool isEnabled, params double[][] values)
17      : base(isEnabled, values.Select(v => new DoubleArray(v)).ToArray()) {
18      Name = "Float vector constants";
19    }
20
21    [StorableConstructor]
22    protected FloatVectorConstantsErcValue(bool deserializing)
23      : base(deserializing) {
24    }
25
26    public FloatVectorConstantsErcValue(FloatVectorConstantsErcValue origin, Cloner cloner)
27      : base(origin, cloner) {
28    }
29
30    public override IDeepCloneable Clone(Cloner cloner) {
31      return new FloatVectorConstantsErcValue(this, cloner);
32    }
33  }
34}
Note: See TracBrowser for help on using the repository browser.