Changeset 14693


Ignore:
Timestamp:
02/23/17 13:08:05 (4 years ago)
Author:
mkommend
Message:

#2650: Fixed ordering of variables in problem data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs

    r14542 r14693  
    157157        throw new ArgumentException("All allowed input variables must be present in the dataset and of type double or string.");
    158158
    159       var inputVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Concat(dataset.StringVariables).Select(x => new StringValue(x)));
     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)));
    160161      foreach (StringValue x in inputVariables)
    161162        inputVariables.SetItemCheckedState(x, allowedInputVariables.Contains(x.Value));
Note: See TracChangeset for help on using the changeset viewer.