Free cookie consent management tool by TermsFeed Policy Generator

Changeset 18209 for trunk


Ignore:
Timestamp:
01/24/22 22:07:17 (3 years ago)
Author:
gkronber
Message:

#3134: bug fix in combination with interpreters that iterate over the variables in a dataset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/PartialDependencePlot.cs

    r18208 r18209  
    639639      if (internalDataset.VariableHasType<double>(variableName)) {
    640640        var v = sharedFixedVariables.GetDoubleValue(variableName, rowIndex);
    641         var values = new List<double>(Enumerable.Repeat(v, internalDataset.Rows));
    642         internalDataset.ReplaceVariable(variableName, values);
     641        // do not use replace variable here because some processes running in parallel might iterate over the variables list
     642        // internalDataset.ReplaceVariable(variableName, values);
     643        for (int i = 0; i < internalDataset.Rows; i++)
     644          internalDataset.SetVariableValue(v, variableName, i);
    643645      } else if (internalDataset.VariableHasType<string>(variableName)) {
    644646        var v = sharedFixedVariables.GetStringValue(variableName, rowIndex);
    645         var values = new List<String>(Enumerable.Repeat(v, internalDataset.Rows));
    646         internalDataset.ReplaceVariable(variableName, values);
     647        for (int i = 0; i < internalDataset.Rows; i++)
     648          internalDataset.SetVariableValue(v, variableName, i);
    647649      } else {
    648650        // unsupported type
Note: See TracChangeset for help on using the changeset viewer.