Changeset 11762
- Timestamp:
- 01/15/15 11:30:03 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/Classification-Extensions/HeuristicLab.Optimization merged eligible /branches/HLScript/HeuristicLab.Optimization merged eligible /stable/HeuristicLab.Optimization merged eligible /branches/1721-RandomForestPersistence/HeuristicLab.Optimization 10321-10322 /branches/Algorithms.GradientDescent/HeuristicLab.Optimization 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Optimization 6917-7005 /branches/CloningRefactoring/HeuristicLab.Optimization 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Optimization 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Optimization 5815-6180 /branches/DataAnalysis/HeuristicLab.Optimization 4458-4459,4462,4464 /branches/DataPreprocessing/HeuristicLab.Optimization 10085-11101 /branches/GP.Grammar.Editor/HeuristicLab.Optimization 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Optimization 5060 /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Optimization 6123-9799 /branches/LogResidualEvaluator/HeuristicLab.Optimization 10202-10483 /branches/NET40/sources/HeuristicLab.Optimization 5138-5162 /branches/ParallelEngine/HeuristicLab.Optimization 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Optimization 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Optimization 6828 /branches/RuntimeOptimizer/HeuristicLab.Optimization 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Optimization 7787-8333 /branches/SlaveShutdown/HeuristicLab.Optimization 8944-8956 /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Optimization 10204-10479 /branches/SuccessProgressAnalysis/HeuristicLab.Optimization 5370-5682 /branches/Trunk/HeuristicLab.Optimization 6829-6865 /branches/UnloadJobs/HeuristicLab.Optimization 9168-9215 /branches/VNS/HeuristicLab.Optimization 5594-5752 /branches/histogram/HeuristicLab.Optimization 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
r11171 r11762 227 227 public virtual void CollectResultValues(IDictionary<string, IItem> values) { 228 228 values.Add("Execution Time", new TimeSpanValue(ExecutionTime)); 229 CollectResultsRecursively("", Results, values); 230 } 231 232 private void CollectResultsRecursively(string path, ResultCollection results, IDictionary<string, IItem> values) { 233 foreach (IResult result in results) { 234 values.Add(path + result.Name, result.Value); 235 ResultCollection childCollection = result.Value as ResultCollection; 236 if (childCollection != null) { 237 CollectResultsRecursively(path + result.Name + ".", childCollection, values); 238 } 239 } 229 Results.CollectResultValues(values); 240 230 } 241 231 -
trunk/sources/HeuristicLab.Optimization/3.3/ResultCollection.cs
r11171 r11762 44 44 get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; } 45 45 } 46 47 public virtual void CollectResultValues(IDictionary<string, IItem> values) { 48 CollectResultValues(values, string.Empty); 49 } 50 51 public virtual void CollectResultValues(IDictionary<string, IItem> values, string rootPath) { 52 foreach (IResult result in this) { 53 var children = GetCollectedResults(result); 54 string path = string.Empty; 55 if (!string.IsNullOrWhiteSpace(rootPath)) 56 path = rootPath + "."; 57 foreach (var c in children) { 58 if (string.IsNullOrEmpty(c.Key)) 59 values.Add(path + result.Name, c.Value); 60 else values.Add(path + result.Name + "." + c.Key, c.Value); 61 } 62 } 63 } 64 65 protected virtual IEnumerable<KeyValuePair<string, IItem>> GetCollectedResults(IResult result) { 66 if (result.Value == null) yield break; 67 yield return new KeyValuePair<string, IItem>(string.Empty, result.Value); 68 69 var resultCollection = result.Value as ResultCollection; 70 if (resultCollection != null) { 71 var children = new Dictionary<string, IItem>(); 72 resultCollection.CollectResultValues(children); 73 foreach (var child in children) yield return child; 74 } 75 } 76 46 77 } 47 78 }
Note: See TracChangeset
for help on using the changeset viewer.