Last change
on this file since 11654 was
7128,
checked in by epitzer, 13 years ago
|
#1696 Integrate fitness landscape analysis plugins from Heureka! repository.
|
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;
|
---|
| 6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 7 |
|
---|
| 8 | namespace HeuristicLab.Analysis.FitnessLandscape.MultiTrajectory {
|
---|
| 9 |
|
---|
| 10 | [StorableClass]
|
---|
| 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]
|
---|
| 22 | protected PreassignedBinaryVectorCreator(bool deserializing) : base(deserializing) { }
|
---|
| 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.