Changeset 17872
- Timestamp:
- 03/09/21 11:52:12 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
r17871 r17872 88 88 private void AfterDeserialization() { 89 89 // replace with PercentValue for files which had CrossoverProbability as DoubleValue 90 if (Parameters.ContainsKey(CrossoverProbabilityParameterName) ) {91 var oldValue = ((IFixedValueParameter<DoubleValue>)Parameters[CrossoverProbabilityParameterName]).Value.Value;92 Parameters.Remove( CrossoverProbabilityParameterName);90 if (Parameters.ContainsKey(CrossoverProbabilityParameterName) && (Parameters[CrossoverProbabilityParameterName] is IFixedValueParameter<DoubleValue> oldParam)) { 91 var oldValue = oldParam.Value.Value; 92 Parameters.Remove(oldParam); 93 93 Parameters.Add(new FixedValueParameter<PercentValue>(CrossoverProbabilityParameterName, "The probability that a crossover is performed. Otherwise a copy of the first parent is returned.", new PercentValue(oldValue))); 94 94 }
Note: See TracChangeset
for help on using the changeset viewer.