Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Core;
|
---|
3 | using HeuristicLab.Data;
|
---|
4 | using HeuristicLab.Encodings.IntegerVectorEncoding;
|
---|
5 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
6 | using System.Linq;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.BioBoost.SolutionCreation {
|
---|
9 |
|
---|
10 | [StorableClass]
|
---|
11 | public class IdentityIntegerVectorCreator : IntegerVectorCreator {
|
---|
12 |
|
---|
13 | #region Construction & Cloning
|
---|
14 | [StorableConstructor]
|
---|
15 | protected IdentityIntegerVectorCreator(bool isDeserializing) : base(isDeserializing) {}
|
---|
16 | protected IdentityIntegerVectorCreator(IdentityIntegerVectorCreator orig, Cloner cloner) : base(orig, cloner) {}
|
---|
17 | public IdentityIntegerVectorCreator() { }
|
---|
18 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
19 | return new IdentityIntegerVectorCreator(this, cloner);
|
---|
20 | }
|
---|
21 | #endregion
|
---|
22 |
|
---|
23 | protected override IntegerVector Create(IRandom random, IntValue length, IntMatrix bounds) {
|
---|
24 | return new IntegerVector(Enumerable.Range(0, length.Value).ToArray());
|
---|
25 | }
|
---|
26 |
|
---|
27 | }
|
---|
28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.