Changeset 17778 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean
- Timestamp:
- 10/29/20 14:44:19 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs
r17655 r17778 39 39 public sealed class EvenParityProblem : SymbolicExpressionTreeProblem { 40 40 41 #region parameter names42 private const string NumberOfBitsParameterName = "NumberOfBits";43 #endregion44 45 41 #region Parameter Properties 46 public IFixedValueParameter<IntValue> NumberOfBitsParameter { 47 get { return (IFixedValueParameter<IntValue>)Parameters[NumberOfBitsParameterName]; } 48 } 42 [Storable] public IFixedValueParameter<IntValue> NumberOfBitsParameter { get; private set; } 49 43 #endregion 50 44 … … 68 62 private EvenParityProblem(EvenParityProblem original, Cloner cloner) 69 63 : base(original, cloner) { 64 NumberOfBitsParameter = cloner.Clone(original.NumberOfBitsParameter); 70 65 RegisterEventHandlers(); 71 66 } … … 78 73 : base(new SymbolicExpressionTreeEncoding()) { 79 74 Maximization = true; 80 Parameters.Add( new FixedValueParameter<IntValue>(NumberOfBitsParameterName, "The number of bits for the input parameter for the even parity function", new IntValue(4)));75 Parameters.Add(NumberOfBitsParameter = new FixedValueParameter<IntValue>("NumberOfBits", "The number of bits for the input parameter for the even parity function", new IntValue(4))); 81 76 82 77 Encoding.TreeLength = 100; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs
r17655 r17778 41 41 public sealed class MultiplexerProblem : SymbolicExpressionTreeProblem { 42 42 43 #region parameter names44 private const string NumberOfBitsParameterName = "NumberOfBits";45 #endregion46 47 43 #region Parameter Properties 48 public IFixedValueParameter<IntValue> NumberOfBitsParameter { 49 get { return (IFixedValueParameter<IntValue>)Parameters[NumberOfBitsParameterName]; } 50 } 44 [Storable] public IFixedValueParameter<IntValue> NumberOfBitsParameter { get; private set; } 51 45 #endregion 52 46 … … 70 64 private MultiplexerProblem(MultiplexerProblem original, Cloner cloner) 71 65 : base(original, cloner) { 66 NumberOfBitsParameter = cloner.Clone(original.NumberOfBitsParameter); 72 67 RegisterEventHandlers(); 73 68 } … … 81 76 : base(new SymbolicExpressionTreeEncoding()) { 82 77 Maximization = true; 83 Parameters.Add( new FixedValueParameter<IntValue>(NumberOfBitsParameterName,78 Parameters.Add(NumberOfBitsParameter = new FixedValueParameter<IntValue>("NumberOfBits", 84 79 "The number of bits for the input parameter for the multiplexer function. This is the sum of the number of address bits and the number of input lines. E.g. the 11-MUX has 3 address bits and 8 input lines", 85 80 new IntValue(11)));
Note: See TracChangeset
for help on using the changeset viewer.