Changeset 14293 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMaxAbsoluteErrorCalculator.cs
- Timestamp:
- 09/20/16 15:51:04 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineMaxAbsoluteErrorCalculator.cs
r14185 r14293 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 OnlineMaxAbsoluteErrorCalculator : IOnlineCalculator {27 public class OnlineMaxAbsoluteErrorCalculator : IOnlineCalculator, IDeepCloneable { 27 28 28 29 private double mae; … … 36 37 public OnlineMaxAbsoluteErrorCalculator() { 37 38 Reset(); 39 } 40 41 // private constructor used internally by the Clone() method 42 private OnlineMaxAbsoluteErrorCalculator(OnlineMaxAbsoluteErrorCalculator other) { 43 mae = other.mae; 44 n = other.n; 45 errorState = other.errorState; 38 46 } 39 47 … … 88 96 } 89 97 } 98 99 // IDeepCloneable interface members 100 public object Clone() { 101 return new OnlineMaxAbsoluteErrorCalculator(this); 102 } 103 104 public IDeepCloneable Clone(Cloner cloner) { 105 var clone = cloner.GetClone(this); 106 if (clone == null) { 107 clone = (IDeepCloneable)this.Clone(); 108 cloner.RegisterClonedObject(this, clone); 109 } 110 return clone; 111 } 90 112 } 91 113 }
Note: See TracChangeset
for help on using the changeset viewer.