Free cookie consent management tool by TermsFeed Policy Generator

Changeset 13761


Ignore:
Timestamp:
04/14/16 13:56:25 (9 years ago)
Author:
bburlacu
Message:

#2593: Rename ReplaceColumn method to ReplaceVariable and make it non-generic. Use new list constructor instead of extension method in the ToModifiable method.

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4
Files:
2 edited

Legend:

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

    r13760 r13761  
    115115      foreach (var v in variableNames) {
    116116        if (VariableHasType<double>(v)) {
    117           values.Add(((List<double>)variableValues[v]).ToList());
     117          values.Add(new List<double>((List<double>)variableValues[v]));
    118118        } else if (VariableHasType<string>(v)) {
    119           values.Add(((List<string>)variableValues[v]).ToList());
     119          values.Add(new List<string>((List<string>)variableValues[v]));
    120120        } else if (VariableHasType<DateTime>(v)) {
    121           values.Add(((List<DateTime>)variableValues[v]).ToList());
     121          values.Add(new List<DateTime>((List<DateTime>)variableValues[v]));
    122122        } else {
    123123          throw new ArgumentException("Unknown variable type.");
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/ModifiableDataset.cs

    r13760 r13761  
    7575    }
    7676
    77     public void ReplaceColumn<T>(string variableName, List<T> values) {
     77    public void ReplaceVariable(string variableName, IList values) {
    7878      if (!variableValues.ContainsKey(variableName))
    7979        throw new ArgumentException(string.Format("Variable {0} is not present in the dataset."), variableName);
Note: See TracChangeset for help on using the changeset viewer.