- Timestamp:
- 12/07/10 10:25:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs
r5051 r5052 36 36 // not thread safe! 37 37 public sealed class SimpleArithmeticExpressionInterpreter : NamedItem, ISymbolicExpressionTreeInterpreter { 38 private struct InstructionEvaluation {39 int instructionIndex;40 int row;41 }42 43 38 private class OpCodes { 44 39 public const byte Add = 1; … … 112 107 private double[] argumentStack = new double[ARGUMENT_STACK_SIZE]; 113 108 private int argStackPointer; 114 private Dictionary<InstructionEvaluation, double> cachedEvaluations;115 109 116 110 public override bool CanChangeName { … … 131 125 public SimpleArithmeticExpressionInterpreter() 132 126 : base() { 133 cachedEvaluations = new Dictionary<InstructionEvaluation, double>();134 127 } 135 128 136 129 public IEnumerable<double> GetSymbolicExpressionTreeValues(SymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) { 137 130 this.dataset = dataset; 138 cachedEvaluations.Clear();139 131 var compiler = new SymbolicExpressionTreeCompiler(); 140 132 compiler.AddInstructionPostProcessingHook(PostProcessInstruction); … … 146 138 yield return Evaluate(); 147 139 } 148 cachedEvaluations.Clear();149 140 } 150 141
Note: See TracChangeset
for help on using the changeset viewer.