Free cookie consent management tool by TermsFeed Policy Generator

Changeset 426


Ignore:
Timestamp:
08/03/08 11:01:27 (16 years ago)
Author:
gkronber
Message:

added properties to access parameters of randomizers (must be combined with r425) (ticket #225)

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

Legend:

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

    r183 r426  
    3838the smallest allowed value then 'Value' is set to the lower bound and vice versa for the upper bound.";
    3939      }
     40    }
     41
     42    public double Mu {
     43      get { return ((DoubleData)GetVariable("Mu").Value).Data; }
     44      set { ((DoubleData)GetVariable("Mu").Value).Data = value; }
     45    }
     46    public double Sigma {
     47      get { return ((DoubleData)GetVariable("Sigma").Value).Data; }
     48      set { ((DoubleData)GetVariable("Sigma").Value).Data = value; }
    4049    }
    4150
  • trunk/sources/HeuristicLab.Random/NormalRandomizer.cs

    r183 r426  
    3333    public override string Description {
    3434      get { return "Initializes the value of variable 'Value' to a random value normally distributed with 'Mu' and 'Sigma'."; }
     35    }
     36
     37    public double Mu {
     38      get { return ((DoubleData)GetVariable("Mu").Value).Data; }
     39      set { ((DoubleData)GetVariable("Mu").Value).Data = value; }
     40    }
     41    public double Sigma {
     42      get { return ((DoubleData)GetVariable("Sigma").Value).Data; }
     43      set { ((DoubleData)GetVariable("Sigma").Value).Data = value; }
    3544    }
    3645
  • trunk/sources/HeuristicLab.Random/UniformRandomizer.cs

    r2 r426  
    3232    public override string Description {
    3333      get { return "Initializes the value of variable 'Value' to a random value uniformly distributed between 'Min' and 'Max' (exclusive)"; }
     34    }
     35
     36    public double Max {
     37      get { return ((DoubleData)GetVariable("Max").Value).Data; }
     38      set { ((DoubleData)GetVariable("Max").Value).Data = value; }
     39    }
     40    public double Min {
     41      get { return ((DoubleData)GetVariable("Min").Value).Data; }
     42      set { ((DoubleData)GetVariable("Min").Value).Data = value; }
    3443    }
    3544
Note: See TracChangeset for help on using the changeset viewer.