Changeset 14826 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
- Timestamp:
- 04/04/17 17:52:44 (7 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis (added) merged: 14232,14238-14239,14249,14330,14351,14399,14449,14497-14499,14542,14592,14693,14762-14763
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
r14507 r14826 152 152 protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) { 153 153 if (dataset == null) throw new ArgumentNullException("The dataset must not be null."); 154 if (allowedInputVariables == null) throw new ArgumentNullException("The allowedInputVariables must not be null."); 155 156 if (allowedInputVariables.Except(dataset.DoubleVariables).Any()) 157 throw new ArgumentException("All allowed input variables must be present in the dataset and of type double."); 158 159 var inputVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Select(x => new StringValue(x))); 154 if (allowedInputVariables == null) throw new ArgumentNullException("The allowed input variables must not be null."); 155 156 if (allowedInputVariables.Except(dataset.DoubleVariables).Except(dataset.StringVariables).Any()) 157 throw new ArgumentException("All allowed input variables must be present in the dataset and of type double or string."); 158 159 var variables = dataset.VariableNames.Where(variable => dataset.VariableHasType<double>(variable) || dataset.VariableHasType<string>(variable)); 160 var inputVariables = new CheckedItemList<StringValue>(variables.Select(x => new StringValue(x))); 160 161 foreach (StringValue x in inputVariables) 161 162 inputVariables.SetItemCheckedState(x, allowedInputVariables.Contains(x.Value));
Note: See TracChangeset
for help on using the changeset viewer.