Changeset 12452 for branches/HeuristicLab.DatasetRefactor
- Timestamp:
- 06/16/15 12:11:48 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r12141 r12452 166 166 return GetValues<DateTime>(variableName); 167 167 } 168 168 169 public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) { 169 var values = GetValues<double>(variableName) .ToList();170 var values = GetValues<double>(variableName); 170 171 return values.AsReadOnly(); 171 172 } 172 173 public double GetDoubleValue(string variableName, int row) { 173 var values = GetValues<double>(variableName) as List<double>;174 var values = GetValues<double>(variableName); 174 175 return values[row]; 175 176 } … … 178 179 } 179 180 private IEnumerable<T> GetValues<T>(string variableName, IEnumerable<int> rows) { 180 var values = GetValues<T>(variableName) as List<T>;181 var values = GetValues<T>(variableName); 181 182 return rows.Select(x => values[x]); 182 183 } 183 private IEnumerable<T> GetValues<T>(string variableName) {184 private List<T> GetValues<T>(string variableName) { 184 185 IList list; 185 186 if (!variableValues.TryGetValue(variableName, out list))
Note: See TracChangeset
for help on using the changeset viewer.