Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCreator.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
     
    4748    }
    4849
     50    [StorableConstructor]
     51    protected StdDevStrategyVectorCreator(bool deserializing) : base(deserializing) { }
     52    protected StdDevStrategyVectorCreator(StdDevStrategyVectorCreator original, Cloner cloner) : base(original, cloner) { }
    4953    public StdDevStrategyVectorCreator()
    5054      : base() {
     
    5559    }
    5660
     61    public override IDeepCloneable Clone(Cloner cloner) {
     62      return new StdDevStrategyVectorCreator(this, cloner);
     63    }
     64
    5765    public override IOperation Apply() {
    5866      StrategyParameterParameter.ActualValue = UniformRandomRealVectorCreator.Apply(RandomParameter.ActualValue, LengthParameter.ActualValue.Value, BoundsParameter.ActualValue);
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorCrossover.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Operators;
     
    4344    }
    4445
     46    [StorableConstructor]
     47    protected StdDevStrategyVectorCrossover(bool deserializing) : base(deserializing) { }
     48    protected StdDevStrategyVectorCrossover(StdDevStrategyVectorCrossover original, Cloner cloner) : base(original, cloner) { }
    4549    public StdDevStrategyVectorCrossover()
    4650      : base() {
     
    5155    }
    5256
     57    public override IDeepCloneable Clone(Cloner cloner) {
     58      return new StdDevStrategyVectorCrossover(this, cloner);
     59    }
     60
    5361    public override IOperation Apply() {
    5462      StrategyParameterParameter.ActualValue = AverageCrossover.Apply(RandomParameter.ActualValue, ParentsParameter.ActualValue);
  • trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/StrategyParameters/StdDevStrategyVectorManipulator.cs

    r4545 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Data;
     
    5455      get { return (IValueLookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
    5556    }
     57
     58    [StorableConstructor]
     59    protected StdDevStrategyVectorManipulator(bool deserializing) : base(deserializing) { }
     60    protected StdDevStrategyVectorManipulator(StdDevStrategyVectorManipulator original, Cloner cloner) : base(original, cloner) { }
    5661    /// <summary>
    5762    /// Initializes a new instance of <see cref="StrategyVectorManipulator"/> with four
     
    6671      Parameters.Add(new ValueLookupParameter<DoubleValue>("LearningRate", "The learning rate (tau)."));
    6772      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("Bounds", "A 2 column matrix specifying the lower and upper bound for each dimension. If there are less rows than dimension the bounds vector is cycled.", new DoubleMatrix(new double[,] { { 0, 5 } })));
     73    }
     74
     75    public override IDeepCloneable Clone(Cloner cloner) {
     76      return new StdDevStrategyVectorManipulator(this, cloner);
    6877    }
    6978
Note: See TracChangeset for help on using the changeset viewer.