using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Data; using HeuristicLab.Encodings.BinaryVectorEncoding; using HeuristicLab.Parameters; using HEAL.Attic; namespace HeuristicLab.Analysis.FitnessLandscape.MultiTrajectory { [StorableType("FCB228DA-7A69-4987-BDBF-CE86027C09C5")] public class PreassignedBinaryVectorCreator : PreassignedSolutionCreator, IBinaryVectorCreator { public ILookupParameter BinaryVectorParameter { get { return (ILookupParameter)Parameters["BinaryVector"]; } } public IValueLookupParameter LengthParameter { get { return (IValueLookupParameter)Parameters["Length"]; } } [StorableConstructor] protected PreassignedBinaryVectorCreator(StorableConstructorFlag _) : base(_) { } protected PreassignedBinaryVectorCreator(PreassignedBinaryVectorCreator original, Cloner cloner) : base(original, cloner) { } public PreassignedBinaryVectorCreator() { Parameters.Add(new LookupParameter("BinaryVector", "The created binary vector.")); Parameters.Add(new ValueLookupParameter("Length", "The length of the binary vector.")); } public override IDeepCloneable Clone(Cloner cloner) { return new PreassignedBinaryVectorCreator(this, cloner); } public override void Create(IScope scope) { BinaryVectorParameter.ActualValue = (BinaryVector)scope.Variables[BinaryVectorParameter.ActualName].Value; } } }