Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4833


Ignore:
Timestamp:
11/18/10 13:07:24 (13 years ago)
Author:
mkommend
Message:

Corrected cloning of results and parameters in Run (ticket #1268).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Run.cs

    r4825 r4833  
    101101        algorithm.CollectResultValues(results);
    102102        Cloner cloner = new Cloner();
    103         parameters = parameters.Select(x => new KeyValuePair<string, IItem>(x.Key, (IItem)x.Value.Clone(cloner))).ToDictionary(x => x.Key, x => x.Value);
    104         results = results.Select(x => new KeyValuePair<string, IItem>(x.Key, (IItem)x.Value.Clone(cloner))).ToDictionary(x => x.Key, x => x.Value);
     103        parameters = parameters.Select(x => new KeyValuePair<string, IItem>(x.Key, cloner.Clone(x.Value))).ToDictionary(x => x.Key, x => x.Value);
     104        results = results.Select(x => new KeyValuePair<string, IItem>(x.Key, cloner.Clone(x.Value))).ToDictionary(x => x.Key, x => x.Value);
    105105      }
    106106    }
Note: See TracChangeset for help on using the changeset viewer.