Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/15/11 16:13:21 (13 years ago)
Author:
gkronber
Message:

#1480 added code for the interpretation of lagged variables to the IL emitting interpreter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs

    r6755 r6770  
    473473          }
    474474        case OpCodes.Call: {
    475             throw new NotImplementedException();
     475            throw new NotSupportedException("Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
    476476          }
    477477        case OpCodes.Arg: {
    478             throw new NotImplementedException();
     478            throw new NotSupportedException("Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
    479479          }
    480480        case OpCodes.Variable: {
     
    483483            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable
    484484            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
    485             il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, 0); // sampleOffset
     485            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // sampleIndex
     486            il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
     487            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
     488            il.Emit(System.Reflection.Emit.OpCodes.Mul);
     489            return;
     490          }
     491        case OpCodes.LagVariable: {
     492            LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
     493            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
     494            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable
     495            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
     496            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag
    486497            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // sampleIndex
    487498            il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset
     
    490501            il.Emit(System.Reflection.Emit.OpCodes.Mul);
    491502            return;
    492           }
    493         case OpCodes.LagVariable: {
    494             throw new NotImplementedException();
    495503          }
    496504        case OpCodes.Constant: {
Note: See TracChangeset for help on using the changeset viewer.