Changeset 8574 for branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/ParameterConfigurations
- Timestamp:
- 09/05/12 11:11:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParameterConfigurationEncoding/HeuristicLab.Encodings.ParameterConfigurationEncoding/3.3/ParameterConfigurations/ParameterConfiguration.cs
r8535 r8574 573 573 } 574 574 } 575 575 576 var clonedValue = this.ActualValue.Value != null ? (IItem)this.ActualValue.Value.Clone() : null; 576 577 if (clonedValue != null) AdaptValidValues(parameter, clonedValue); 577 parameter.Value = clonedValue; 578 579 if (!(parameter is IFixedValueParameter)) { 580 parameter.Value = clonedValue; 581 } else { 582 var original = (dynamic)parameter.Value; 583 var clone = (dynamic)clonedValue; 584 if (typeof(ValueTypeValue<>).IsAssignableFrom(parameter.DataType) && !original.ReadOnly) { 585 original.Value = clone.Value; 586 } else if (typeof(ValueTypeArray<>).IsAssignableFrom(parameter.DataType) && !original.ReadOnly) { 587 for (int i = 0; i < original.Length; i++) 588 original[i] = clone[i]; 589 } else if (typeof(ValueTypeMatrix<>).IsAssignableFrom(parameter.DataType) && !original.ReadOnly) { 590 for (int i = 0; i < original.Rows; i++) 591 for (int j = 0; j < original.Columns; j++) 592 original[i, j] = clone[i, j]; 593 } // StringConvertibleValueTuple<,> not supported 594 } 578 595 } 579 596
Note: See TracChangeset
for help on using the changeset viewer.