Changeset 5026 for branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
- Timestamp:
- 12/06/10 10:28:34 (14 years ago)
- 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
-
Property
svn:ignore
set to
-
branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
r4722 r5026 66 66 public const byte Constant = 20; 67 67 public const byte Arg = 21; 68 69 public const byte TimeLag = 22; 68 70 } 69 71 … … 90 92 { typeof(Constant), OpCodes.Constant }, 91 93 { typeof(Argument), OpCodes.Arg }, 94 { typeof(TimeLag), OpCodes.TimeLag}, 92 95 }; 93 96 private const int ARGUMENT_STACK_SIZE = 1024; … … 290 293 return constTreeNode.Value; 291 294 } 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 } 292 306 default: throw new NotSupportedException(); 293 307 }
Note: See TracChangeset
for help on using the changeset viewer.