1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Operators;
|
---|
6 | using HeuristicLab.Optimization;
|
---|
7 | using HeuristicLab.Core;
|
---|
8 | using HeuristicLab.Parameters;
|
---|
9 | using HeuristicLab.Common;
|
---|
10 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
11 | using HeuristicLab.Data;
|
---|
12 |
|
---|
13 | namespace 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 | } |
---|