Changeset 5275 for branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
- Timestamp:
- 01/11/11 15:03:46 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs
r4220 r5275 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab.Common;24 24 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 44 44 } 45 45 46 47 protected VariableTreeNode() { } 48 49 // copy constructor 50 protected VariableTreeNode(VariableTreeNode original) 51 : base(original) { 46 [StorableConstructor] 47 protected VariableTreeNode(bool deserializing) : base(deserializing) { } 48 protected VariableTreeNode(VariableTreeNode original, Cloner cloner) 49 : base(original, cloner) { 52 50 weight = original.weight; 53 51 variableName = original.variableName; 54 52 } 55 53 protected VariableTreeNode() { } 56 54 public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { } 57 55 … … 64 62 public override void ResetLocalParameters(IRandom random) { 65 63 base.ResetLocalParameters(random); 66 weight = NormalDistributedRandom.NextDouble(random, Symbol.Weight Nu, Symbol.WeightSigma);64 weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma); 67 65 variableName = Symbol.VariableNames.SelectRandom(random); 68 66 } … … 70 68 public override void ShakeLocalParameters(IRandom random, double shakingFactor) { 71 69 base.ShakeLocalParameters(random, shakingFactor); 72 double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulator Nu, Symbol.WeightManipulatorSigma);70 double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma); 73 71 weight = weight + x * shakingFactor; 74 72 variableName = Symbol.VariableNames.SelectRandom(random); 75 73 } 76 74 77 78 public override object Clone() { 79 return new VariableTreeNode(this); 75 public override IDeepCloneable Clone(Cloner cloner) { 76 return new VariableTreeNode(this, cloner); 80 77 } 81 78
Note: See TracChangeset
for help on using the changeset viewer.