Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/11 17:48:53 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

Location:
branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs

    r5809 r6618  
    3232    private const string ShakingFactorParameterName = "ShakingFactor";
    3333    #region parameter properties
    34     public IValueLookupParameter<DoubleValue> ShakingFactorParameter {
    35       get { return (IValueLookupParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
     34    public IValueParameter<DoubleValue> ShakingFactorParameter {
     35      get { return (IValueParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
    3636    }
    3737    #endregion
    3838    #region properties
    39     public DoubleValue ShakingFactor {
    40       get { return ShakingFactorParameter.ActualValue; }
     39    public double ShakingFactor {
     40      get { return ShakingFactorParameter.Value.Value; }
     41      set { ShakingFactorParameter.Value.Value = value; }
    4142    }
    4243    #endregion
    43 
    4444    [StorableConstructor]
    4545    private FullTreeShaker(bool deserializing) : base(deserializing) { }
     
    4747    public FullTreeShaker()
    4848      : base() {
    49       Parameters.Add(new ValueLookupParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
     49      Parameters.Add(new FixedValueParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
    5050    }
    5151
     
    5757      tree.Root.ForEachNodePostfix(node => {
    5858        if (node.HasLocalParameters) {
    59           node.ShakeLocalParameters(random, ShakingFactor.Value);
     59          node.ShakeLocalParameters(random, ShakingFactor);
    6060        }
    6161      });
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs

    r5809 r6618  
    3434    private const string ShakingFactorParameterName = "ShakingFactor";
    3535    #region parameter properties
    36     public IValueLookupParameter<DoubleValue> ShakingFactorParameter {
    37       get { return (IValueLookupParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
     36    public IValueParameter<DoubleValue> ShakingFactorParameter {
     37      get { return (IValueParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
    3838    }
    3939    #endregion
    4040    #region properties
    41     public DoubleValue ShakingFactor {
    42       get { return ShakingFactorParameter.ActualValue; }
     41    public double ShakingFactor {
     42      get { return ShakingFactorParameter.Value.Value; }
     43      set { ShakingFactorParameter.Value.Value = value; }
    4344    }
    4445    #endregion
     
    4849    public OnePointShaker()
    4950      : base() {
    50       Parameters.Add(new ValueLookupParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
     51      Parameters.Add(new FixedValueParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
    5152    }
    5253
     
    6263      if (parametricNodes.Count > 0) {
    6364        var selectedPoint = parametricNodes.SelectRandom(random);
    64         selectedPoint.ShakeLocalParameters(random, ShakingFactor.Value);
     65        selectedPoint.ShakeLocalParameters(random, ShakingFactor);
    6566      }
    6667    }
Note: See TracChangeset for help on using the changeset viewer.