Changeset 14330 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineNormalizedMeanSquaredErrorCalculator.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/OnlineNormalizedMeanSquaredErrorCalculator.cs
r14226 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 OnlineNormalizedMeanSquaredErrorCalculator : IOnlineCalculator {27 public class OnlineNormalizedMeanSquaredErrorCalculator : IOnlineCalculator, IDeepCloneable { 27 28 private OnlineMeanAndVarianceCalculator meanSquaredErrorCalculator; 28 29 private OnlineMeanAndVarianceCalculator originalVarianceCalculator; … … 40 41 originalVarianceCalculator = new OnlineMeanAndVarianceCalculator(); 41 42 Reset(); 43 } 44 45 protected OnlineNormalizedMeanSquaredErrorCalculator(OnlineNormalizedMeanSquaredErrorCalculator other, Cloner cloner) { 46 meanSquaredErrorCalculator = (OnlineMeanAndVarianceCalculator)other.meanSquaredErrorCalculator.Clone(cloner); 47 originalVarianceCalculator = (OnlineMeanAndVarianceCalculator)other.originalVarianceCalculator.Clone(cloner); 42 48 } 43 49 … … 92 98 } 93 99 } 100 101 // IDeepCloneable members 102 public object Clone() { 103 var cloner = new Cloner(); 104 return new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner); 105 } 106 107 public IDeepCloneable Clone(Cloner cloner) { 108 var clone = cloner.GetClone(this); 109 if (clone == null) { 110 clone = new OnlineNormalizedMeanSquaredErrorCalculator(this, cloner); 111 cloner.RegisterClonedObject(this, clone); 112 } 113 return clone; 114 } 94 115 } 95 116 }
Note: See TracChangeset
for help on using the changeset viewer.