Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/10 11:59:50 (14 years ago)
Author:
gkronber
Message:

Minor improvements concerning efficiency of symbolic expression tree encoding data structures and operators. #1073

File:
1 edited

Legend:

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

    r3512 r3997  
    6767    public override void ResetLocalParameters(IRandom random) {
    6868      base.ResetLocalParameters(random);
    69       var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightNu, Symbol.WeightSigma);
    70       weight = normalDistributedRNG.NextDouble();
     69      weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightNu, Symbol.WeightSigma);
    7170      variableName = Symbol.VariableNames.SelectRandom(random);
    7271    }
     
    7473    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    7574      base.ShakeLocalParameters(random, shakingFactor);
    76       var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma);
    77       double x = normalDistributedRNG.NextDouble();
     75      double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma);
    7876      weight = weight + x * shakingFactor;
    7977      variableName = Symbol.VariableNames.SelectRandom(random);
Note: See TracChangeset for help on using the changeset viewer.