- Timestamp:
- 04/14/16 13:33:02 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r13539 r13760 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 111 111 } 112 112 113 public ModifiableDataset ToModifiable() { 114 var values = new List<IList>(); 115 foreach (var v in variableNames) { 116 if (VariableHasType<double>(v)) { 117 values.Add(((List<double>)variableValues[v]).ToList()); 118 } else if (VariableHasType<string>(v)) { 119 values.Add(((List<string>)variableValues[v]).ToList()); 120 } else if (VariableHasType<DateTime>(v)) { 121 values.Add(((List<DateTime>)variableValues[v]).ToList()); 122 } else { 123 throw new ArgumentException("Unknown variable type."); 124 } 125 } 126 return new ModifiableDataset(variableNames, values); 127 } 128 113 129 protected Dataset(Dataset dataset) : this(dataset.variableNames, dataset.variableValues.Values) { } 114 130
Note: See TracChangeset
for help on using the changeset viewer.