Changeset 5009 for branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Creators
- Timestamp:
- 12/01/10 20:37:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Creators/RandomParameterConfigurationCreator.cs
r4997 r5009 20 20 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 21 21 } 22 public ILookupParameter< IValueConfiguration> ValueConfigurationParameter {23 get { return (ILookupParameter< IValueConfiguration>)Parameters["ValueConfiguration"]; }22 public ILookupParameter<ParameterConfigurationTree> InitialParameterConfigurationParameter { 23 get { return (ILookupParameter<ParameterConfigurationTree>)Parameters["InitialParameterConfigurationTree"]; } 24 24 } 25 25 26 public ILookupParameter< IValueConfiguration> NewValueConfigurationParameter {27 get { return (ILookupParameter< IValueConfiguration>)Parameters["NewValueConfiguration"]; }26 public ILookupParameter<ParameterConfigurationTree> ParameterConfigurationParameter { 27 get { return (ILookupParameter<ParameterConfigurationTree>)Parameters["ParameterConfigurationTree"]; } 28 28 } 29 29 … … 33 33 public RandomParameterConfigurationCreator() : base() { 34 34 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used to initialize the new random permutation.")); 35 Parameters.Add(new LookupParameter<IValueConfiguration>("ValueConfiguration", "The new random parameter set.")); 35 Parameters.Add(new LookupParameter<ParameterConfigurationTree>("InitialParameterConfigurationTree", "The parameter configuration tree on which the new solution will be based on.")); 36 Parameters.Add(new LookupParameter<ParameterConfigurationTree>("ParameterConfigurationTree", "The new random parameter set.")); 36 37 } 37 38 public override IDeepCloneable Clone(Cloner cloner) { … … 40 41 41 42 public override IOperation Apply() { 42 NewValueConfigurationParameter.ActualValue = (IValueConfiguration)ValueConfigurationParameter.ActualValue.Clone(); 43 NewValueConfigurationParameter.ActualValue.Randomize(); 44 NewValueConfigurationParameter.ActualValue.Parameterize(); 43 ParameterConfigurationParameter.ActualValue = (ParameterConfigurationTree)InitialParameterConfigurationParameter.ActualValue.Clone(); 44 ParameterConfigurationParameter.ActualValue.Randomize(RandomParameter.ActualValue); 45 45 return base.Apply(); 46 46 }
Note: See TracChangeset
for help on using the changeset viewer.