Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13027


Ignore:
Timestamp:
10/16/15 17:01:02 (9 years ago)
Author:
bburlacu
Message:

#2489: Clone values in the ModifiableDataset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/ModifiableDataset.cs

    r12511 r13027  
    3737    [StorableConstructor]
    3838    private ModifiableDataset(bool deserializing) : base(deserializing) { }
    39     private ModifiableDataset(ModifiableDataset original, Cloner cloner) : base(original, cloner) { }
     39
     40    private ModifiableDataset(ModifiableDataset original, Cloner cloner) : base(original, cloner) {
     41      var variables = variableValues.Keys.ToList();
     42      foreach (var v in variables) {
     43        var type = GetVariableType(v);
     44        if (type == typeof(DateTime)) {
     45          variableValues[v] = GetDateTimeValues(v).ToList();
     46        } else if (type == typeof(double)) {
     47          variableValues[v] = GetDoubleValues(v).ToList();
     48        }
     49      }
     50    }
    4051    public override IDeepCloneable Clone(Cloner cloner) { return new ModifiableDataset(this, cloner); }
    4152    public ModifiableDataset() : base() { }
Note: See TracChangeset for help on using the changeset viewer.