Changeset 3690
- Timestamp:
- 05/07/10 02:21:01 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs
r3687 r3690 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 59 60 AddValue(table, (param.ActualValue as DoubleValue).Value, name, param.Description); 60 61 } else if (param.ActualValue is IEnumerable<DoubleValue>) { 61 int counter = 0; 62 foreach (DoubleValue data in (param.ActualValue as IEnumerable<DoubleValue>)) { 63 AddValue(table, data.Value, name + " " + counter.ToString(), param.Description); 64 counter++; 62 IEnumerable<DoubleValue> values = (IEnumerable<DoubleValue>)param.ActualValue; 63 if (values.Count() <= 1) { 64 foreach (DoubleValue data in values) 65 AddValue(table, data != null ? data.Value : double.NaN, name, param.Description); 66 } else { 67 int counter = 1; 68 foreach (DoubleValue data in values) { 69 AddValue(table, data != null ? data.Value : double.NaN, name + " " + counter.ToString(), param.Description); 70 counter++; 71 } 65 72 } 66 73 } else { -
trunk/sources/HeuristicLab.Optimization.Operators/3.3/ResultsCollector.cs
r3687 r3690 20 20 #endregion 21 21 22 using System.Collections; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 62 63 string name = lookupParam != null ? lookupParam.TranslatedName : param.Name; 63 64 65 IScopeTreeLookupParameter scopeTreeLookupParam = param as IScopeTreeLookupParameter; 66 if ((scopeTreeLookupParam != null) && (scopeTreeLookupParam.Depth == 0)) { 67 IEnumerator enumerator = ((IEnumerable)value).GetEnumerator(); 68 if (enumerator.MoveNext()) 69 value = (IItem)enumerator.Current; 70 } 71 64 72 results.TryGetValue(name, out result); 65 73 if (result != null)
Note: See TracChangeset
for help on using the changeset viewer.