1 | using System.Collections.Generic;
|
---|
2 | using HeuristicLab.Common;
|
---|
3 | using HeuristicLab.Core;
|
---|
4 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Problems.MetaOptimization {
|
---|
7 | [StorableClass]
|
---|
8 | public class NullValueConfiguration : ValueConfiguration {
|
---|
9 |
|
---|
10 | public NullValueConfiguration() {
|
---|
11 | this.ActualValue = new ConstrainedValue(null, null, null, true);
|
---|
12 | this.IsOptimizable = false;
|
---|
13 | }
|
---|
14 | [StorableConstructor]
|
---|
15 | protected NullValueConfiguration(bool deserializing) : base(deserializing) { }
|
---|
16 | protected NullValueConfiguration(NullValueConfiguration original, Cloner cloner)
|
---|
17 | : base(original, cloner) {
|
---|
18 | }
|
---|
19 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
20 | return new NullValueConfiguration(this, cloner);
|
---|
21 | }
|
---|
22 |
|
---|
23 | public override string ToString() {
|
---|
24 | return "null";
|
---|
25 | }
|
---|
26 |
|
---|
27 | public override void Randomize(IRandom random) { }
|
---|
28 |
|
---|
29 | public override void Mutate(IRandom random, MutateDelegate mutate, IIntValueManipulator intValueManipulator, IDoubleValueManipulator doubleValueManipulator) { }
|
---|
30 |
|
---|
31 | public override void Cross(IRandom random, IOptimizable other, CrossDelegate cross, IIntValueCrossover intValueCrossover, IDoubleValueCrossover doubleValueCrossover) { }
|
---|
32 |
|
---|
33 | public override double CalculateSimilarity(IOptimizable optimizable) {
|
---|
34 | return 1.0;
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override string ParameterInfoString {
|
---|
38 | get { return "null"; }
|
---|
39 | }
|
---|
40 |
|
---|
41 | public override void CollectOptimizedParameterNames(List<string> parameterNames, string prefix) { }
|
---|
42 |
|
---|
43 | public override List<IOptimizable> GetAllOptimizables() {
|
---|
44 | return new List<IOptimizable>();
|
---|
45 | }
|
---|
46 | }
|
---|
47 | }
|
---|