- Timestamp:
- 09/06/18 12:20:50 (6 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
-
stable/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis merged: 16063
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r16124 r16125 116 116 117 117 public ModifiableDataset ToModifiable() { 118 var values = new List<IList>(); 119 foreach (var v in variableNames) { 120 if (VariableHasType<double>(v)) { 121 values.Add(new List<double>((IList<double>)variableValues[v])); 122 } else if (VariableHasType<string>(v)) { 123 values.Add(new List<string>((IList<string>)variableValues[v])); 124 } else if (VariableHasType<DateTime>(v)) { 125 values.Add(new List<DateTime>((IList<DateTime>)variableValues[v])); 126 } else { 127 throw new ArgumentException("Unknown variable type."); 128 } 129 } 130 return new ModifiableDataset(variableNames, values); 118 return new ModifiableDataset(variableNames, variableNames.Select(v => variableValues[v]),true); 131 119 } 132 120 … … 141 129 } 142 130 143 protected Dataset(Dataset dataset) : this(dataset.variableNames, dataset.variableValues.Values) { } 131 144 132 145 133 #region Backwards compatible code, remove with 3.5 … … 318 306 #region IStringConvertibleMatrix Members 319 307 [Storable] 320 pr otectedint rows;308 private int rows; 321 309 public int Rows { 322 310 get { return rows; } 311 protected set { rows = value; } 323 312 } 324 313 int IStringConvertibleMatrix.Rows {
Note: See TracChangeset
for help on using the changeset viewer.