Changeset 10553 for branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
- Timestamp:
- 03/05/14 17:30:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r8798 r10553 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 76 76 var values = variableValues.ElementAt(i); 77 77 IList clonedValues = null; 78 if (values is List<double>)78 if (values is IList<double>) 79 79 clonedValues = new List<double>(values.Cast<double>()); 80 else if (values is List<string>)80 else if (values is IList<string>) 81 81 clonedValues = new List<string>(values.Cast<string>()); 82 else if (values is List<DateTime>)82 else if (values is IList<DateTime>) 83 83 clonedValues = new List<DateTime>(values.Cast<DateTime>()); 84 84 else { 85 85 this.variableNames = new List<string>(); 86 86 this.variableValues = new Dictionary<string, IList>(); 87 throw new ArgumentException("The variable values must be of type List<double>, List<string> orList<DateTime>");87 throw new ArgumentException("The variable values must be of type IList<double>, IList<string> or IList<DateTime>"); 88 88 } 89 89 this.variableValues.Add(this.variableNames[i], clonedValues); … … 191 191 throw new ArgumentException("The variable " + variableName + " does not exist in the dataset."); 192 192 List<double> values = list as List<double>; 193 if (values == null) throw new ArgumentException("The varia lbe " + variableName + " is not a double variable.");193 if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable."); 194 194 195 195 return rows.Select(index => values[index]);
Note: See TracChangeset
for help on using the changeset viewer.