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:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/SquareRootDiscreteDoubleValueModifier.cs

    r4068 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3132  [StorableClass]
    3233  public class SquareRootDiscreteDoubleValueModifier : DiscreteDoubleValueModifier {
     34    [StorableConstructor]
     35    protected SquareRootDiscreteDoubleValueModifier(bool deserializing) : base(deserializing) { }
     36    protected SquareRootDiscreteDoubleValueModifier(SquareRootDiscreteDoubleValueModifier original, Cloner cloner) : base(original, cloner) { }
     37    public SquareRootDiscreteDoubleValueModifier() : base() { }
     38
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new SquareRootDiscreteDoubleValueModifier(this, cloner);
     41    }
     42
    3343    protected override double Modify(double value, double startValue, double endValue, int index, int startIndex, int endIndex) {
    3444      double a = (endValue - startValue) / Math.Sqrt(endIndex - startIndex);
Note: See TracChangeset for help on using the changeset viewer.