Last change
on this file since 17040 was
16995,
checked in by gkronber, 6 years ago
|
#2520 Update plugin dependencies and references for HL.FLA for new persistence
|
File size:
1.5 KB
|
Rev | Line | |
---|
[7128] | 1 | using HeuristicLab.Common;
|
---|
| 2 | using HeuristicLab.Core;
|
---|
| 3 | using HeuristicLab.Data;
|
---|
| 4 | using HeuristicLab.Encodings.BinaryVectorEncoding;
|
---|
| 5 | using HeuristicLab.Parameters;
|
---|
[16573] | 6 | using HEAL.Attic;
|
---|
[7128] | 7 |
|
---|
| 8 | namespace HeuristicLab.Analysis.FitnessLandscape.MultiTrajectory {
|
---|
| 9 |
|
---|
[16573] | 10 | [StorableType("FCB228DA-7A69-4987-BDBF-CE86027C09C5")]
|
---|
[7128] | 11 | public class PreassignedBinaryVectorCreator : PreassignedSolutionCreator, IBinaryVectorCreator {
|
---|
| 12 |
|
---|
| 13 | public ILookupParameter<BinaryVector> BinaryVectorParameter {
|
---|
| 14 | get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | public IValueLookupParameter<IntValue> LengthParameter {
|
---|
| 18 | get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; }
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | [StorableConstructor]
|
---|
[16573] | 22 | protected PreassignedBinaryVectorCreator(StorableConstructorFlag _) : base(_) { }
|
---|
[7128] | 23 | protected PreassignedBinaryVectorCreator(PreassignedBinaryVectorCreator original, Cloner cloner)
|
---|
| 24 | : base(original, cloner) {
|
---|
| 25 | }
|
---|
| 26 | public PreassignedBinaryVectorCreator() {
|
---|
| 27 | Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The created binary vector."));
|
---|
| 28 | Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the binary vector."));
|
---|
| 29 | }
|
---|
| 30 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 31 | return new PreassignedBinaryVectorCreator(this, cloner);
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | public override void Create(IScope scope) {
|
---|
| 35 | BinaryVectorParameter.ActualValue = (BinaryVector)scope.Variables[BinaryVectorParameter.ActualName].Value;
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.