Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/13/13 15:15:58 (11 years ago)
Author:
sbreuer
Message:
  • initial view with hello world
  • make dataset writeable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs

    r9456 r10134  
    213213    }
    214214    public bool ReadOnly {
    215       get { return true; }
     215      get { return false; }
    216216    }
    217217
     
    229229    }
    230230    public bool SetValue(string value, int rowIndex, int columnIndex) {
    231       throw new NotSupportedException();
     231      var values = variableValues[variableNames[columnIndex]];
     232      object insertValue = null;
     233      if (values is List<double>)
     234        insertValue = Double.Parse(value); /// TODO: set culture
     235      else if (values is List<string>)
     236        insertValue = value;
     237      else if (values is List<DateTime>)
     238        insertValue = DateTime.Parse(value);
     239      else
     240        throw new ArgumentException("The variable values must be of type double, string or DateTime");
     241
     242      variableValues[variableNames[columnIndex]][rowIndex] = insertValue;
     243      return true;
    232244    }
    233245    public bool Validate(string value, out string errorMessage) {
Note: See TracChangeset for help on using the changeset viewer.