Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/Manipulators/ParameterConfigurationOnePositionsManipulator.cs @ 5653

Last change on this file since 5653 was 5303, checked in by cneumuel, 14 years ago

#1215

  • manipulators for one and all parameters
  • SolutionCache to avoid multiple evaluations of equal solutions
  • RunsAnalyzer which stores all base level runs
  • ItemDictionaryView for runs
File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Operators;
6using HeuristicLab.Optimization;
7using HeuristicLab.Core;
8using HeuristicLab.Parameters;
9using HeuristicLab.Common;
10using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
11using HeuristicLab.Data;
12
13namespace HeuristicLab.Problems.MetaOptimization {
14  // todo: item name/descr...
15  [StorableClass]
16  public class ParameterConfigurationOnePositionsManipulator : ParameterConfigurationManipulator {
17
18    public ParameterConfigurationOnePositionsManipulator() { }
19    [StorableConstructor]
20    protected ParameterConfigurationOnePositionsManipulator(bool deserializing) : base(deserializing) { }
21    protected ParameterConfigurationOnePositionsManipulator(ParameterConfigurationOnePositionsManipulator original, Cloner cloner)
22      : base(original, cloner) {
23    }
24    public override IDeepCloneable Clone(Cloner cloner) {
25      return new ParameterConfigurationOnePositionsManipulator(this, cloner);
26    }
27
28    public sealed override IOperation Apply() {
29      Apply(RandomParameter.ActualValue, ParameterConfigurationTreeParameter.ActualValue, IntValueManipulatorParameter.ActualValue, DoubleValueManipulatorParameter.ActualValue);
30      return base.Apply();
31    }
32
33    public static void Apply(IRandom random, ParameterConfigurationTree configuration, IIntValueManipulator intValueManipulator, IDoubleValueManipulator doubleValueManipulator) {
34      IOptimizable optimizable = configuration.GetRandomOptimizable(random);
35      Mutate(random, optimizable, intValueManipulator, doubleValueManipulator);
36    }
37  }
38}
Note: See TracBrowser for help on using the repository browser.