Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/02/16 17:35:05 (8 years ago)
Author:
gkronber
Message:

#2650: merged r14422:14443 from trunk to branches resolving conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisExpressionTreeInterpreter.cs

    r14185 r14449  
    4545    }
    4646
    47     [ThreadStatic]
    48     private static double[] targetVariableCache;
    49     [ThreadStatic]
    50     private static List<int> invalidateCacheIndexes;
    51 
    5247    [StorableConstructor]
    5348    private SymbolicTimeSeriesPrognosisExpressionTreeInterpreter(bool deserializing) : base(deserializing) { }
     
    7772      if (CheckExpressionsWithIntervalArithmetic)
    7873        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
    79       if (targetVariableCache == null || targetVariableCache.GetLength(0) < dataset.Rows)
    80         targetVariableCache = dataset.GetDoubleValues(TargetVariable).ToArray();
    81       if (invalidateCacheIndexes == null)
    82         invalidateCacheIndexes = new List<int>(10);
    8374
    8475      string targetVariable = TargetVariable;
     76      double[] targetVariableCache = dataset.GetDoubleValues(targetVariable).ToArray();
    8577      lock (syncRoot) {
    8678        EvaluatedSolutions++; // increment the evaluated solutions counter
     
    10092          vProgs[i] = Evaluate(dataset, ref localRow, state);
    10193          targetVariableCache[localRow] = vProgs[i];
    102           invalidateCacheIndexes.Add(localRow);
    10394          state.Reset();
    10495        }
    10596        yield return vProgs;
    106 
    107         int j = 0;
    108         foreach (var targetValue in dataset.GetDoubleValues(targetVariable, invalidateCacheIndexes)) {
    109           targetVariableCache[invalidateCacheIndexes[j]] = targetValue;
    110           j++;
    111         }
    112         invalidateCacheIndexes.Clear();
    11397      }
    11498
Note: See TracChangeset for help on using the changeset viewer.