Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/NullValueConfiguration.cs @ 11255

Last change on this file since 11255 was 9827, checked in by jkarder, 11 years ago

#1099:

  • adapted MetaOpt NamedItems once more
    • gave more meaningful names to some items
    • removed unreferenced default ctors
    • changed access modifiers
File size: 1.7 KB
Line 
1using System.Collections.Generic;
2using HeuristicLab.Common;
3using HeuristicLab.Core;
4using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
5
6namespace HeuristicLab.Problems.MetaOptimization {
7  [StorableClass]
8  public class NullValueConfiguration : ValueConfiguration {
9    public NullValueConfiguration()
10      : base() {
11      ActualValue = new ConstrainedValue(null, null, null, true);
12      IsOptimizable = false;
13      Name = "NullValueConfiguration";
14    }
15    [StorableConstructor]
16    protected NullValueConfiguration(bool deserializing) : base(deserializing) { }
17    protected NullValueConfiguration(NullValueConfiguration original, Cloner cloner)
18      : base(original, cloner) {
19    }
20    public override IDeepCloneable Clone(Cloner cloner) {
21      return new NullValueConfiguration(this, cloner);
22    }
23
24    public override string ToString() {
25      return "null";
26    }
27
28    public override void Randomize(IRandom random) { }
29
30    public override void Mutate(IRandom random, MutateDelegate mutate, IIntValueManipulator intValueManipulator, IDoubleValueManipulator doubleValueManipulator) { }
31
32    public override void Cross(IRandom random, IOptimizable other, CrossDelegate cross, IIntValueCrossover intValueCrossover, IDoubleValueCrossover doubleValueCrossover) { }
33
34    public override double CalculateSimilarity(IOptimizable optimizable) {
35      return 1.0;
36    }
37
38    public override string ParameterInfoString {
39      get { return "null"; }
40    }
41
42    public override void CollectOptimizedParameterNames(List<string> parameterNames, string prefix) { }
43
44    public override List<IOptimizable> GetAllOptimizables() {
45      return new List<IOptimizable>();
46    }
47  }
48}
Note: See TracBrowser for help on using the repository browser.