Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/07/16 14:06:02 (7 years ago)
Author:
bburlacu
Message:

#2672: Updated cloning mechanism to conform to the HL standard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMeanAndVarianceCalculator.cs

    r14294 r14376  
    2424
    2525namespace HeuristicLab.Problems.DataAnalysis {
    26   public class OnlineMeanAndVarianceCalculator : IDeepCloneable {
     26  public class OnlineMeanAndVarianceCalculator : DeepCloneable {
    2727
    2828    private double m_oldM, m_newM, m_oldS, m_newS;
     
    118118    }
    119119
    120     // IDeepCloneable members
    121     public object Clone() {
    122       return new OnlineMeanAndVarianceCalculator(this);
    123     }
    124 
    125     public IDeepCloneable Clone(Cloner cloner) {
    126       var clone = cloner.GetClone(this);
    127       if (clone == null) {
    128         clone = new OnlineMeanAndVarianceCalculator(this);
    129         cloner.RegisterClonedObject(this, clone);
    130       }
    131       return clone;
     120    public override IDeepCloneable Clone(Cloner cloner) {
     121      return new OnlineMeanAndVarianceCalculator(this, cloner);
    132122    }
    133123  }
Note: See TracChangeset for help on using the changeset viewer.