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

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols
Files:
3 edited

Legend:

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

    r3512 r3997  
    6565    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    6666      base.ShakeLocalParameters(random, shakingFactor);
    67       var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.ManipulatorNu, Symbol.ManipulatorSigma);
    68       double x = normalDistributedRNG.NextDouble();
     67      double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorNu, Symbol.ManipulatorSigma);
    6968      Value = Value + x * shakingFactor;
    7069    }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs

    r3841 r3997  
    7373    public override void ResetLocalParameters(IRandom random) {
    7474      base.ResetLocalParameters(random);
    75       var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightNu, Symbol.WeightSigma);
    76       weight = normalDistributedRNG.NextDouble();
     75      weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightNu, Symbol.WeightSigma);
    7776      variableName = Symbol.VariableNames.SelectRandom(random);
    7877      lag = random.Next(Symbol.MinLag, Symbol.MaxLag + 1);
     
    8180    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
    8281      base.ShakeLocalParameters(random, shakingFactor);
    83       var normalDistributedRNG = new NormalDistributedRandom(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma);
    84       double x = normalDistributedRNG.NextDouble();
     82      double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorNu, Symbol.WeightManipulatorSigma);
    8583      weight = weight + x * shakingFactor;
    8684      variableName = Symbol.VariableNames.SelectRandom(random);
  • 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.