Changeset 8436 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs
- Timestamp:
- 08/08/12 16:04:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/InterpreterState.cs
r8431 r8436 24 24 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 25 25 public class InterpreterState { 26 private double[] argumentStack;26 private readonly double[] argumentStack; 27 27 private int argumentStackPointer; 28 private Instruction[] code; 29 private int pc; 30 public int ProgramCounter { 31 get { return pc; } 32 set { pc = value; } 33 } 28 private readonly Instruction[] code; 29 30 public int ProgramCounter { get; set; } 31 public bool InLaggedContext { get; set; } 32 34 33 public InterpreterState(Instruction[] code, int argumentStackSize) { 35 34 this.code = code; 36 this.pc = 0; 35 this.ProgramCounter = 0; 36 this.InLaggedContext = false; 37 37 if (argumentStackSize > 0) { 38 38 this.argumentStack = new double[argumentStackSize]; … … 42 42 43 43 public void Reset() { 44 this. pc= 0;44 this.ProgramCounter = 0; 45 45 this.argumentStackPointer = 0; 46 this.InLaggedContext = false; 46 47 } 47 48 48 49 public Instruction NextInstruction() { 49 return code[ pc++];50 return code[ProgramCounter++]; 50 51 } 51 52 // skips a whole branch
Note: See TracChangeset
for help on using the changeset viewer.