Changeset 13179


Ignore:
Timestamp:
11/16/15 15:24:02 (4 years ago)
Author:
mkommend
Message:

#2489: Merged r13027 and r13040 into stable.

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis

  • stable/HeuristicLab.Problems.DataAnalysis/3.4/ModifiableDataset.cs

    r12702 r13179  
    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        } else if (type == typeof(string)) {
     49          variableValues[v] = GetStringValues(v).ToList();
     50        } else {
     51          throw new ArgumentException("Unsupported type " + type + " for variable " + v);
     52        }
     53      }
     54    }
    4055    public override IDeepCloneable Clone(Cloner cloner) { return new ModifiableDataset(this, cloner); }
    4156    public ModifiableDataset() : base() { }
Note: See TracChangeset for help on using the changeset viewer.