Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/26/13 15:58:54 (11 years ago)
Author:
bburlacu
Message:

#2021: Small code improvements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataAnalysis.Symbolic.LinearInterpreter/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r9788 r9793  
    178178          case OpCodes.Integral:
    179179          case OpCodes.Derivative: {
     180              Instruction[] seq = GetPrefixSequence(code, i);
     181              var interpreterState = new InterpreterState(seq, 0);
     182              instr.iArg0 = interpreterState;
    180183              for (int j = 0; j != instr.nArguments; ++j) {
     184                // the linear evaluator will skip these instructions and they will be evaluated using the default (recursive) evaluator
    181185                setSkip(code[instr.childIndex + j]);
    182186              }
     
    472476          case OpCodes.Integral:
    473477          case OpCodes.Derivative: {
    474               if (instr.iArg0 == null) {
    475                 instr.iArg0 = GetPrefixSequence(code, i); ;
    476               }
    477               var interpreterState = new InterpreterState((LinearInstruction[])instr.iArg0, 0);
    478               instr.value = interpreter.Evaluate(dataset, ref row, interpreterState);
     478              var state = (InterpreterState)instr.iArg0;
     479              state.Reset();
     480              instr.value = interpreter.Evaluate(dataset, ref row, state);
    479481            }
    480482            break;
Note: See TracChangeset for help on using the changeset viewer.