- Timestamp:
- 07/09/14 13:15:37 (10 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources reverse-merged: 11114,11116,11156 /branches/DataPreprocessing removed
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis reverse-merged: 11114,11156 /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis removed
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r11157 r11158 170 170 yield return value; 171 171 } 172 173 public IEnumerable<string> GetStringValues(string variableName) {174 IList list;175 if (!variableValues.TryGetValue(variableName, out list))176 throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");177 List<string> values = list as List<string>;178 if (values == null) throw new ArgumentException("The variable " + variableName + " is not a string variable.");179 180 //mkommend yield return used to enable lazy evaluation181 foreach (string value in values)182 yield return value;183 }184 185 public IEnumerable<DateTime> GetDateTimeValues(string variableName) {186 IList list;187 if (!variableValues.TryGetValue(variableName, out list))188 throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");189 List<DateTime> values = list as List<DateTime>;190 if (values == null) throw new ArgumentException("The variable " + variableName + " is not a datetime variable.");191 192 //mkommend yield return used to enable lazy evaluation193 foreach (DateTime value in values)194 yield return value;195 }196 197 172 public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) { 198 173 IList list; … … 219 194 220 195 return rows.Select(index => values[index]); 221 }222 223 public bool VariableHasType<T>(string variableName) {224 return variableValues[variableName] is IList<T>;225 196 } 226 197
Note: See TracChangeset
for help on using the changeset viewer.