Changeset 14330 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineDirectionalSymmetryCalculator.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/OnlineDirectionalSymmetryCalculator.cs
r14185 r14330 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis { 28 public class OnlineDirectionalSymmetryCalculator : IOnlineTimeSeriesCalculator {28 public class OnlineDirectionalSymmetryCalculator : IOnlineTimeSeriesCalculator, IDeepCloneable { 29 29 private int n; 30 30 private int nCorrect; … … 39 39 public OnlineDirectionalSymmetryCalculator() { 40 40 Reset(); 41 } 42 43 protected OnlineDirectionalSymmetryCalculator(OnlineDirectionalSymmetryCalculator other, Cloner cloner = null) { 44 n = other.n; 45 nCorrect = other.nCorrect; 46 errorState = other.errorState; 41 47 } 42 48 … … 94 100 return dsCalculator.DirectionalSymmetry; 95 101 } 96 102 97 103 public static double Calculate(IEnumerable<double> startValues, IEnumerable<IEnumerable<double>> actualContinuations, IEnumerable<IEnumerable<double>> predictedContinuations, out OnlineCalculatorError errorState) { 98 104 IEnumerator<double> startValueEnumerator = startValues.GetEnumerator(); … … 116 122 } 117 123 } 124 125 // IDeepCloneable interface members 126 public object Clone() { 127 return new OnlineDirectionalSymmetryCalculator(this); 128 } 129 130 public IDeepCloneable Clone(Cloner cloner) { 131 var clone = cloner.GetClone(this); 132 if (clone == null) { 133 clone = new OnlineDirectionalSymmetryCalculator(this); 134 cloner.RegisterClonedObject(this, clone); 135 } 136 return clone; 137 } 118 138 } 119 139 }
Note: See TracChangeset
for help on using the changeset viewer.