Changeset 5275 for branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols
- Timestamp:
- 01/11/11 15:03:46 (14 years ago)
- Location:
- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/DerivativeVariable.cs
r4113 r5275 47 47 set { maxLag = value; } 48 48 } 49 [StorableConstructor] 50 protected DerivativeVariable(bool deserializing) : base(deserializing) { } 51 protected DerivativeVariable(DerivativeVariable original, Cloner cloner) 52 : base(original, cloner) { 53 minLag = original.minLag; 54 maxLag = original.maxLag; 55 } 49 56 public DerivativeVariable() 50 57 : base("DerivativeVariable", "Represents an differentiated variable value with a time offset.") { … … 57 64 58 65 public override IDeepCloneable Clone(Cloner cloner) { 59 DerivativeVariable clone = (DerivativeVariable)base.Clone(cloner); 60 clone.minLag = minLag; 61 clone.maxLag = maxLag; 62 return clone; 66 return new DerivativeVariable(this, cloner); 63 67 } 64 68 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/DerivativeVariableTreeNode.cs
r4113 r5275 44 44 private DerivativeVariableTreeNode() { } 45 45 46 // copy constructor 47 private DerivativeVariableTreeNode(DerivativeVariableTreeNode original) 48 : base(original) { 49 lag = original.lag; 46 [StorableConstructor] 47 protected DerivativeVariableTreeNode(bool deserializing) : base(deserializing) { } 48 protected DerivativeVariableTreeNode(DerivativeVariableTreeNode original, Cloner cloner) 49 : base(original, cloner) { 50 lag = original.lag; 50 51 } 51 52 … … 69 70 70 71 71 public override object Clone() {72 return new DerivativeVariableTreeNode(this );72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new DerivativeVariableTreeNode(this, cloner); 73 74 } 74 75 -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/IntegratedVariable.cs
r4113 r5275 47 47 set { maxLag = value; } 48 48 } 49 [StorableConstructor] 50 protected IntegratedVariable(bool deserializing) : base(deserializing) { } 51 protected IntegratedVariable(IntegratedVariable original, Cloner cloner) 52 : base(original, cloner) { 53 minLag = original.minLag; 54 maxLag = original.maxLag; 55 } 49 56 public IntegratedVariable() 50 57 : base("IntegratedVariable", "Represents an integrated variable value with a time offset.") { … … 57 64 58 65 public override IDeepCloneable Clone(Cloner cloner) { 59 IntegratedVariable clone = (IntegratedVariable)base.Clone(cloner); 60 clone.minLag = minLag; 61 clone.maxLag = maxLag; 62 return clone; 66 return new IntegratedVariable(this, cloner); 63 67 } 64 68 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/IntegratedVariableTreeNode.cs
r4113 r5275 50 50 51 51 private IntegratedVariableTreeNode() { } 52 53 // copy constructor54 pr ivate IntegratedVariableTreeNode(IntegratedVariableTreeNode original)55 : base(original ) {52 [StorableConstructor] 53 protected IntegratedVariableTreeNode(bool deserializing) : base(deserializing) { } 54 protected IntegratedVariableTreeNode(IntegratedVariableTreeNode original, Cloner cloner) 55 : base(original, cloner) { 56 56 minTimeOffset = original.minTimeOffset; 57 57 maxTimeOffset = original.maxTimeOffset; … … 77 77 maxTimeOffset = Math.Min(Symbol.MaxLag, Math.Max(minTimeOffset, maxTimeOffset + random.Next(-1, 2))); 78 78 } 79 80 81 public override object Clone() { 82 return new IntegratedVariableTreeNode(this); 79 public override IDeepCloneable Clone(Cloner cloner) { 80 return new IntegratedVariableTreeNode(this, cloner); 83 81 } 84 85 82 public override string ToString() { 86 83 return Weight.ToString("E4") + " I(" + VariableName + -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/MovingAverage.cs
r4113 r5275 47 47 set { maxLag = value; } 48 48 } 49 [StorableConstructor] 50 protected MovingAverage(bool deserializing) : base(deserializing) { } 51 protected MovingAverage(MovingAverage original, Cloner cloner) 52 : base(original, cloner) { 53 minLag = original.minLag; 54 maxLag = original.maxLag; 55 } 49 56 public MovingAverage() 50 57 : base("MovingAverage", "Represents a moving average of a variable value with a time offset.") { … … 57 64 58 65 public override IDeepCloneable Clone(Cloner cloner) { 59 MovingAverage clone = (MovingAverage)base.Clone(cloner); 60 clone.minLag = minLag; 61 clone.maxLag = maxLag; 62 return clone; 66 return new MovingAverage(this, cloner); 63 67 } 64 68 } -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/Symbols/MovingAverageTreeNode.cs
r4113 r5275 50 50 51 51 private MovingAverageTreeNode() { } 52 53 // copy constructor54 pr ivate MovingAverageTreeNode(MovingAverageTreeNode original)55 : base(original ) {52 [StorableConstructor] 53 protected MovingAverageTreeNode(bool deserializing) : base(deserializing) { } 54 protected MovingAverageTreeNode(MovingAverageTreeNode original, Cloner cloner) 55 : base(original, cloner) { 56 56 minTimeOffset = original.minTimeOffset; 57 57 maxTimeOffset = original.maxTimeOffset; … … 79 79 80 80 81 public override object Clone() {82 return new MovingAverageTreeNode(this );81 public override IDeepCloneable Clone(Cloner cloner) { 82 return new MovingAverageTreeNode(this, cloner); 83 83 } 84 85 84 public override string ToString() { 86 85 return Weight.ToString("E4") + " MA(" + VariableName +
Note: See TracChangeset
for help on using the changeset viewer.