- Timestamp:
- 11/25/14 13:05:14 (10 years ago)
- Location:
- branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/BinaryEncoding.cs
r11575 r11582 27 27 using HeuristicLab.Data; 28 28 using HeuristicLab.Encodings.BinaryVectorEncoding; 29 using HeuristicLab.Optimization;30 29 using HeuristicLab.Parameters; 31 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 74 73 : base(name) { 75 74 lengthParameter = new FixedValueParameter<IntValue>(Name + "Length", new IntValue(length)); 75 RegisterParameterEvents(); 76 DiscoverOperators(); 77 SolutionCreator = Operators.OfType<RandomBinaryVectorCreator>().Single(); 76 78 } 77 79 -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/Encoding.cs
r11559 r11582 49 49 50 50 51 ISolutionCreator IEncoding.DefaultSolutionCreator { get { return DefaultSolutionCreator; } }52 public virtual T DefaultSolutionCreator {53 get { return null; }54 }55 56 57 51 ISolutionCreator IEncoding.SolutionCreator { 58 52 get { return SolutionCreator; } … … 65 59 public T SolutionCreator { 66 60 get { 67 if (solutionCreator == null) return DefaultSolutionCreator;68 61 return solutionCreator; 69 62 } -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/IntegerEncoding.cs
r11561 r11582 87 87 boundsParameter = cloner.Clone(original.boundsParameter); 88 88 RegisterParameterEvents(); 89 DiscoverOperators();90 89 } 91 90 public override IDeepCloneable Clone(Cloner cloner) { return new IntegerEncoding(this, cloner); } … … 102 101 RegisterParameterEvents(); 103 102 DiscoverOperators(); 103 SolutionCreator = Operators.OfType<UniformRandomIntegerVectorCreator>().Single(); 104 104 } 105 105 public IntegerEncoding(string name, int length, IList<int> min, IList<int> max, IList<int> step = null) … … 118 118 RegisterParameterEvents(); 119 119 DiscoverOperators(); 120 SolutionCreator = Operators.OfType<UniformRandomIntegerVectorCreator>().Single(); 120 121 } 121 122 -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/PermutationEncoding.cs
r11575 r11582 27 27 using HeuristicLab.Data; 28 28 using HeuristicLab.Encodings.PermutationEncoding; 29 using HeuristicLab.Encodings.RealVectorEncoding;30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 30 using HeuristicLab.PluginInfrastructure; … … 96 95 RegisterParameterEvents(); 97 96 DiscoverOperators(); 97 SolutionCreator = Operators.OfType<RandomPermutationCreator>().Single(); 98 98 } 99 99 -
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Encodings/RealEncoding.cs
r11561 r11582 103 103 RegisterParameterEvents(); 104 104 DiscoverOperators(); 105 SolutionCreator = Operators.OfType<UniformRandomRealVectorCreator>().Single(); 105 106 } 106 107 … … 120 121 RegisterParameterEvents(); 121 122 DiscoverOperators(); 123 SolutionCreator = Operators.OfType<UniformRandomRealVectorCreator>().Single(); 122 124 } 123 125
Note: See TracChangeset
for help on using the changeset viewer.