Changeset 14330 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineTheilsUStatisticCalculator.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/OnlineTheilsUStatisticCalculator.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 OnlineTheilsUStatisticCalculator : IOnlineTimeSeriesCalculator {27 public class OnlineTheilsUStatisticCalculator : IOnlineTimeSeriesCalculator, IDeepCloneable { 27 28 private OnlineMeanAndVarianceCalculator squaredErrorMeanCalculator; 28 29 private OnlineMeanAndVarianceCalculator unbiasedEstimatorMeanCalculator; … … 43 44 unbiasedEstimatorMeanCalculator = new OnlineMeanAndVarianceCalculator(); 44 45 Reset(); 46 } 47 48 protected OnlineTheilsUStatisticCalculator(OnlineTheilsUStatisticCalculator other, Cloner cloner) { 49 squaredErrorMeanCalculator = (OnlineMeanAndVarianceCalculator)other.squaredErrorMeanCalculator.Clone(cloner); 50 unbiasedEstimatorMeanCalculator = (OnlineMeanAndVarianceCalculator)other.unbiasedEstimatorMeanCalculator.Clone(cloner); 45 51 } 46 52 … … 125 131 } 126 132 } 133 134 // IDeepCloneable members 135 public object Clone() { 136 var cloner = new Cloner(); 137 return new OnlineTheilsUStatisticCalculator(this, cloner); 138 } 139 140 public IDeepCloneable Clone(Cloner cloner) { 141 var clone = cloner.GetClone(this); 142 if (clone == null) { 143 clone = new OnlineTheilsUStatisticCalculator(this, cloner); 144 cloner.RegisterClonedObject(this, clone); 145 } 146 return clone; 147 } 127 148 } 128 149 }
Note: See TracChangeset
for help on using the changeset viewer.