Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/20/16 17:14:41 (8 years ago)
Author:
bburlacu
Message:

#2672: Add cloning constructors.

File:
1 edited

Legend:

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

    r14293 r14294  
    3939    }
    4040
    41     // private constructor used internally by the Clone() method
    42     private OnlineCovarianceCalculator(OnlineCovarianceCalculator other) : this() {
     41    protected OnlineCovarianceCalculator(OnlineCovarianceCalculator other, Cloner cloner = null) {
    4342      Cn = other.Cn;
    4443      xMean = other.xMean;
     
    113112      var clone = cloner.GetClone(this);
    114113      if (clone == null) {
    115         clone = (IDeepCloneable)this.Clone();
     114        clone = new OnlineCovarianceCalculator(this);
    116115        cloner.RegisterClonedObject(this, clone);
    117116      }
Note: See TracChangeset for help on using the changeset viewer.