Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/06/10 10:28:34 (14 years ago)
Author:
mkommend
Message:

Added branched projects for new GP symbols (ticket #1256).

Location:
branches/GP.Symbols (TimeLag, Diff, Integral)
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/GP.Symbols (TimeLag, Diff, Integral)

    • Property svn:ignore set to
      GP.Symbols.suo
  • branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs

    r4722 r5026  
    6666      public const byte Constant = 20;
    6767      public const byte Arg = 21;
     68
     69      public const byte TimeLag = 22;
    6870    }
    6971
     
    9092      { typeof(Constant), OpCodes.Constant },
    9193      { typeof(Argument), OpCodes.Arg },
     94      { typeof(TimeLag), OpCodes.TimeLag},
    9295    };
    9396    private const int ARGUMENT_STACK_SIZE = 1024;
     
    290293            return constTreeNode.Value;
    291294          }
     295        case OpCodes.TimeLag: {
     296            var timeLagTreeNode = (LaggedTreeNode)currentInstr.dynamicNode;
     297            row += timeLagTreeNode.Lag;
     298            if (row < 0 || row >= dataset.Rows) {
     299              row -= timeLagTreeNode.Lag;
     300              return double.NaN;
     301            }
     302            double result = Evaluate();
     303            row -= timeLagTreeNode.Lag;
     304            return result;
     305          }
    292306        default: throw new NotSupportedException();
    293307      }
Note: See TracChangeset for help on using the changeset viewer.