Free cookie consent management tool by TermsFeed Policy Generator

source: addons/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ValueConfigurations/NullValueConfiguration.cs

Last change on this file was 16996, checked in by gkronber, 6 years ago

#2520 Update plugin dependencies and references for HL.MetaOptimization for new persistence

File size: 1.7 KB
Line 
1using System.Collections.Generic;
2using HeuristicLab.Common;
3using HeuristicLab.Core;
4using HEAL.Attic;
5
6namespace HeuristicLab.Problems.MetaOptimization {
7  [StorableType("0BEC2BB3-2E1C-4933-AA01-F3D10B8E19D2")]
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(StorableConstructorFlag _) : base(_) { }
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.