Free cookie consent management tool by TermsFeed Policy Generator

Changeset 719 for trunk/sources


Ignore:
Timestamp:
11/07/08 16:41:02 (16 years ago)
Author:
abeham
Message:

[TICKET #341] Changed HeuristicLab.Random operators to also take min/max, mu/sigma from scope

Location:
trunk/sources/HeuristicLab.Random
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Random/NormalRandomAdder.cs

    r469 r719  
    6767      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
    6868      double factor = GetVariableValue<DoubleData>("ShakingFactor", scope, true).Data;
    69       double mu = GetVariableValue<DoubleData>("Mu", null, false).Data;
    70       double sigma = GetVariableValue<DoubleData>("Sigma", null, false).Data;
     69      double mu = GetVariableValue<DoubleData>("Mu", scope, true).Data;
     70      double sigma = GetVariableValue<DoubleData>("Sigma", scope, true).Data;
    7171      NormalDistributedRandom normal = new NormalDistributedRandom(mt, mu, sigma * factor);
    7272
  • trunk/sources/HeuristicLab.Random/NormalRandomizer.cs

    r469 r719  
    6060      IObjectData value = GetVariableValue<IObjectData>("Value", scope, false);
    6161      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
    62       double mu = GetVariableValue<DoubleData>("Mu", null, false).Data;
    63       double sigma = GetVariableValue<DoubleData>("Sigma", null, false).Data;
     62      double mu = GetVariableValue<DoubleData>("Mu", scope, true).Data;
     63      double sigma = GetVariableValue<DoubleData>("Sigma", scope, true).Data;
    6464      NormalDistributedRandom normal = new NormalDistributedRandom(mt, mu, sigma);
    6565
  • trunk/sources/HeuristicLab.Random/UniformRandomAdder.cs

    r469 r719  
    5858      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
    5959      double factor = GetVariableValue<DoubleData>("ShakingFactor", scope, true).Data;
    60       double min = GetVariableValue<DoubleData>("Min", null, false).Data;
    61       double max = GetVariableValue<DoubleData>("Max", null, false).Data;
     60      double min = GetVariableValue<DoubleData>("Min", scope, true).Data;
     61      double max = GetVariableValue<DoubleData>("Max", scope, true).Data;
    6262
    6363      double ex = (max - min) / 2.0 + min;
  • trunk/sources/HeuristicLab.Random/UniformRandomizer.cs

    r469 r719  
    5858      IObjectData value = GetVariableValue<IObjectData>("Value", scope, false);
    5959      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
    60       double min = GetVariableValue<DoubleData>("Min", null, false).Data;
    61       double max = GetVariableValue<DoubleData>("Max", null, false).Data;
     60      double min = GetVariableValue<DoubleData>("Min", scope, true).Data;
     61      double max = GetVariableValue<DoubleData>("Max", scope, true).Data;
    6262
    6363      value.Accept(new RandomVisitor(mt, min, max));
Note: See TracChangeset for help on using the changeset viewer.