Changeset 7706
- Timestamp:
- 04/04/12 17:21:22 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs
r7579 r7706 85 85 public virtual void CollectParameterValues(IDictionary<string, IItem> values) { 86 86 foreach (IValueParameter param in parameters.OfType<IValueParameter>()) { 87 if (param.GetsCollected) { 88 var children = GetCollectedValues(param.Value); 89 foreach (var c in children) { 90 if (String.IsNullOrEmpty(c.Key)) 91 values.Add(param.Name, c.Value); 92 else values.Add(param.Name + "." + c.Key, c.Value); 93 } 87 var children = GetCollectedValues(param); 88 foreach (var c in children) { 89 if (String.IsNullOrEmpty(c.Key)) 90 values.Add(param.Name, c.Value); 91 else values.Add(param.Name + "." + c.Key, c.Value); 94 92 } 95 93 } 96 94 } 97 95 98 protected virtual IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(I Item value) {99 if ( value == null) yield break;100 yield return new KeyValuePair<string, IItem>(String.Empty, value);101 var parameterizedItem = value as IParameterizedItem;96 protected virtual IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IValueParameter param) { 97 if (param.Value == null) yield break; 98 if (param.GetsCollected) yield return new KeyValuePair<string, IItem>(String.Empty, param.Value); 99 var parameterizedItem = param.Value as IParameterizedItem; 102 100 if (parameterizedItem != null) { 103 101 var children = new Dictionary<string, IItem>(); -
trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r7579 r7706 240 240 } 241 241 242 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(I Item value) {243 var children = base.GetCollectedValues( value);242 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IValueParameter param) { 243 var children = base.GetCollectedValues(param); 244 244 foreach (var child in children) { 245 245 if (child.Value is IOperator) -
trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs
r7579 r7706 98 98 #endregion 99 99 100 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(I Item value) {101 var children = base.GetCollectedValues( value);100 protected override IEnumerable<KeyValuePair<string, IItem>> GetCollectedValues(IValueParameter param) { 101 var children = base.GetCollectedValues(param); 102 102 foreach (var child in children) { 103 103 if (child.Value is IOperator)
Note: See TracChangeset
for help on using the changeset viewer.