Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/11 10:01:27 (14 years ago)
Author:
gkronber
Message:

#1418 implemented recursive collection of result collections into runs in algorithm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Optimization/3.3/Algorithm.cs

    r5615 r5650  
    224224    public virtual void CollectResultValues(IDictionary<string, IItem> values) {
    225225      values.Add("Execution Time", new TimeSpanValue(ExecutionTime));
    226       foreach (IResult result in Results)
    227         values.Add(result.Name, result.Value);
     226      CollectResultsRecursively("", Results, values);
     227    }
     228
     229    private void CollectResultsRecursively(string path, ResultCollection results, IDictionary<string, IItem> values) {
     230      foreach (IResult result in results) {
     231        values.Add(path + result.Name, result.Value);
     232        ResultCollection childCollection = result.Value as ResultCollection;
     233        if (childCollection != null) {
     234          CollectResultsRecursively(path + result.Name + ".", childCollection, values);
     235        }
     236      }
    228237    }
    229238
Note: See TracChangeset for help on using the changeset viewer.