Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/11 15:03:46 (14 years ago)
Author:
gkronber
Message:

Merged changes from trunk to data analysis exploration branch and added fractional distance metric evaluator. #1142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs

    r4220 r5275  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Common;
    2424using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4444    }
    4545
    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) {
    5250      weight = original.weight;
    5351      variableName = original.variableName;
    5452    }
    55 
     53    protected VariableTreeNode() { }
    5654    public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { }
    5755
     
    6462    public override void ResetLocalParameters(IRandom random) {
    6563      base.ResetLocalParameters(random);
    66       weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightNu, Symbol.WeightSigma);
     64      weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma);
    6765      variableName = Symbol.VariableNames.SelectRandom(random);
    6866    }
     
    7068    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    7169      base.ShakeLocalParameters(random, shakingFactor);
    72       double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma);
     70      double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
    7371      weight = weight + x * shakingFactor;
    7472      variableName = Symbol.VariableNames.SelectRandom(random);
    7573    }
    7674
    77 
    78     public override object Clone() {
    79       return new VariableTreeNode(this);
     75    public override IDeepCloneable Clone(Cloner cloner) {
     76      return new VariableTreeNode(this, cloner);
    8077    }
    8178
Note: See TracChangeset for help on using the changeset viewer.