Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/03/15 14:15:26 (10 years ago)
Author:
mkommend
Message:

#2278: Merged r11762, r11763, r11764 and r11766 into stable.

Location:
stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Optimization

    • Property svn:mergeinfo set to (toggle deleted branches)
      /branches/HLScript/HeuristicLab.Optimizationmergedeligible
      /trunk/sources/HeuristicLab.Optimizationmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.Optimization10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.Optimization5516-5520
      /branches/Benchmarking/sources/HeuristicLab.Optimization6917-7005
      /branches/Classification-Extensions/HeuristicLab.Optimization11687-11761
      /branches/CloningRefactoring/HeuristicLab.Optimization4656-4721
      /branches/DataAnalysis Refactoring/HeuristicLab.Optimization5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Optimization5815-6180
      /branches/DataAnalysis/HeuristicLab.Optimization4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.Optimization10085-11101
      /branches/GP.Grammar.Editor/HeuristicLab.Optimization6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Optimization5060
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Optimization6123-9799
      /branches/LogResidualEvaluator/HeuristicLab.Optimization10202-10483
      /branches/NET40/sources/HeuristicLab.Optimization5138-5162
      /branches/ParallelEngine/HeuristicLab.Optimization5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Optimization6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Optimization6828
      /branches/RuntimeOptimizer/HeuristicLab.Optimization8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Optimization7787-8333
      /branches/SlaveShutdown/HeuristicLab.Optimization8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Optimization10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.Optimization5370-5682
      /branches/Trunk/HeuristicLab.Optimization6829-6865
      /branches/UnloadJobs/HeuristicLab.Optimization9168-9215
      /branches/VNS/HeuristicLab.Optimization5594-5752
      /branches/histogram/HeuristicLab.Optimization5959-6341
  • stable/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r11170 r11872  
    227227    public virtual void CollectResultValues(IDictionary<string, IItem> values) {
    228228      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);
    240230    }
    241231
  • stable/HeuristicLab.Optimization/3.3/ResultCollection.cs

    r11170 r11872  
    4444      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
    4545    }
     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
    4677  }
    4778}
Note: See TracChangeset for help on using the changeset viewer.