Changeset 6569 for branches/QAPAlgorithms/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
- Timestamp:
- 07/17/11 22:51:11 (13 years ago)
- Location:
- branches/QAPAlgorithms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAPAlgorithms
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/QAPAlgorithms/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
r5809 r6569 34 34 private const string ShakingFactorParameterName = "ShakingFactor"; 35 35 #region parameter properties 36 public IValue LookupParameter<DoubleValue> ShakingFactorParameter {37 get { return (IValue LookupParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }36 public IValueParameter<DoubleValue> ShakingFactorParameter { 37 get { return (IValueParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; } 38 38 } 39 39 #endregion 40 40 #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; } 43 44 } 44 45 #endregion … … 48 49 public OnePointShaker() 49 50 : 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))); 51 52 } 52 53 … … 62 63 if (parametricNodes.Count > 0) { 63 64 var selectedPoint = parametricNodes.SelectRandom(random); 64 selectedPoint.ShakeLocalParameters(random, ShakingFactor .Value);65 selectedPoint.ShakeLocalParameters(random, ShakingFactor); 65 66 } 66 67 }
Note: See TracChangeset
for help on using the changeset viewer.