Changeset 14330 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalculator.cs
- Timestamp:
- 10/13/16 19:47:41 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
- Property svn:mergeinfo changed
/trunk/sources merged: 14282,14284-14300,14307,14314-14316,14319,14322
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis merged: 14289-14290,14292-14295
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineCovarianceCalculator.cs
r14185 r14330 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 25 26 namespace HeuristicLab.Problems.DataAnalysis { 26 public class OnlineCovarianceCalculator : IOnlineCalculator {27 public class OnlineCovarianceCalculator : IOnlineCalculator, IDeepCloneable { 27 28 28 29 private double xMean, yMean, Cn; … … 36 37 public OnlineCovarianceCalculator() { 37 38 Reset(); 39 } 40 41 protected OnlineCovarianceCalculator(OnlineCovarianceCalculator other, Cloner cloner = null) { 42 Cn = other.Cn; 43 xMean = other.xMean; 44 yMean = other.yMean; 45 n = other.n; 46 errorState = other.errorState; 38 47 } 39 48 … … 94 103 } 95 104 } 105 106 // IDeepCloneable interface members 107 public object Clone() { 108 return new OnlineCovarianceCalculator(this); 109 } 110 111 public IDeepCloneable Clone(Cloner cloner) { 112 var clone = cloner.GetClone(this); 113 if (clone == null) { 114 clone = new OnlineCovarianceCalculator(this); 115 cloner.RegisterClonedObject(this, clone); 116 } 117 return clone; 118 } 96 119 } 97 120 }
Note: See TracChangeset
for help on using the changeset viewer.