- Timestamp:
- 11/04/16 18:04:16 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineAccuracyCalculator.cs
r14294 r14372 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineAccuracyCalculator : IOnlineCalculator, IDeepCloneable{27 public class OnlineAccuracyCalculator : DeepCloneable, IOnlineCalculator { 28 28 29 29 private int correctlyClassified; … … 39 39 } 40 40 41 // private constructor used internally by the Clone() method42 protected OnlineAccuracyCalculator(OnlineAccuracyCalculator other, Cloner cloner = null) {43 correctlyClassified = o ther.correctlyClassified;44 n = o ther.n;45 errorState = o ther.errorState;41 protected OnlineAccuracyCalculator(OnlineAccuracyCalculator original, Cloner cloner) 42 : base(original, cloner) { 43 correctlyClassified = original.correctlyClassified; 44 n = original.n; 45 errorState = original.errorState; 46 46 } 47 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new OnlineAccuracyCalculator(this, cloner); 50 } 51 47 52 48 53 #region IOnlineCalculator Members … … 98 103 } 99 104 100 // IDeepCloneable interface members101 public object Clone() {102 return new OnlineAccuracyCalculator(this);103 }104 105 public IDeepCloneable Clone(Cloner cloner) {106 var clone = cloner.GetClone(this);107 if (clone == null) {108 clone = new OnlineAccuracyCalculator(this);109 cloner.RegisterClonedObject(this, clone);110 }111 return clone;112 }113 105 } 114 106 }
Note: See TracChangeset
for help on using the changeset viewer.