Ignore:
Timestamp:
04/10/17 00:27:31 (2 years ago)
Author:
pkimmesw
Message:

#2665 LexicaseSelector, Performance improvements, UI Fixes, Debugger only shows used stacks, fixed Debugger stepping, Added vector expressions, ERCOptions,

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Expressions/DoTimesExpressions.cs

    r14777 r14834  
    1010    protected DoTimesExpression() { }
    1111    protected DoTimesExpression(LoopState state) : base(state) { }
    12     protected override bool HasInsufficientArguments(IPushInterpreter interpreter, IStack<Expression> sourceStack) {
     12    protected override bool HasInsufficientArguments(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
    1313      return (interpreter.IntegerStack.Count < 1) || (sourceStack.Count == 0) || (interpreter.IntegerStack.Top <= 0);
    1414    }
    1515
    16     protected override LoopState InitState(IPushInterpreter interpreter, IStack<Expression> sourceStack) {
     16    protected override LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
    1717      return LoopState.Create(interpreter.PoolContainer.LoopStatePool,
    1818        body: sourceStack.Pop(),
     
    2222    }
    2323
    24     protected override void PushIteration(IPushInterpreter interpreter) {
     24    protected override void PushIteration(IInternalPushInterpreter interpreter) {
    2525      var newState = LoopState.Create(interpreter.PoolContainer.LoopStatePool, State.Body, State.CurrentIndex + this.State.Incrementor, State.DestinationIndex, State.Incrementor);
    2626      var nextLoopExpression = Clone(newState, interpreter);
     
    2929    }
    3030
    31     protected override void PushLastIteration(IPushInterpreter interpreter) {
     31    protected override void PushLastIteration(IInternalPushInterpreter interpreter) {
    3232      interpreter.ExecStack.Push(this.State.Body);
    3333    }
     
    4646    public CodeDoTimesExpression(LoopState state) : base(state) { }
    4747
    48     public override bool Eval(IPushInterpreter interpreter) {
     48    public override bool Eval(IInternalPushInterpreter interpreter) {
    4949      return this.Eval(interpreter, interpreter.CodeStack);
    5050    }
    5151
    52     protected override LoopExpression Clone(LoopState state, IPushInterpreter interpreter) {
     52    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
    5353      var expression = interpreter.PoolContainer.GetStatefulExpression<CodeDoTimesExpression>();
    5454      expression.State = state;
     
    7373    public ExecDoTimesExpression(LoopState state) : base(state) { }
    7474
    75     public override bool Eval(IPushInterpreter interpreter) {
     75    public override bool Eval(IInternalPushInterpreter interpreter) {
    7676      return this.Eval(interpreter, interpreter.ExecStack);
    7777    }
    7878
    79     protected override LoopExpression Clone(LoopState state, IPushInterpreter interpreter) {
     79    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
    8080      var expression = interpreter.PoolContainer.GetStatefulExpression<ExecDoTimesExpression>();
    8181      expression.State = state;
Note: See TracChangeset for help on using the changeset viewer.