Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/17 00:27:31 (8 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/DoRangeExpressions.cs

    r14777 r14834  
    1010    protected DoRangeExpression() { }
    1111    protected DoRangeExpression(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 < 2 ||
    1414             sourceStack.Count == 0 ||
     
    1616    }
    1717
    18     protected override LoopState InitState(IPushInterpreter interpreter, IStack<Expression> sourceStack) {
     18    protected override LoopState InitState(IInternalPushInterpreter interpreter, IPushStack<Expression> sourceStack) {
    1919      var destinationIndex = interpreter.IntegerStack.Pop();
    2020      var incrementor = destinationIndex < interpreter.IntegerStack.Top ? -1 : 1;
     
    3333  ///     execution of
    3434  ///     the body of the loop. The top integer is the "destination index" and the second integer is the "current index."
    35   ///     First the code
     35  ///     Last the code
    3636  ///     and the integer arguments are saved locally and popped. Then the integers are compared. If the integers are equal
    3737  ///     then the current
     
    5656
    5757    public CodeDoRangeExpression(LoopState state) : base(state) { }
    58     public override bool Eval(IPushInterpreter interpreter) {
     58    public override bool Eval(IInternalPushInterpreter interpreter) {
    5959      return this.Eval(interpreter, interpreter.CodeStack);
    6060    }
    6161
    62     protected override LoopExpression Clone(LoopState state, IPushInterpreter interpreter) {
     62    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
    6363      var expression = interpreter.PoolContainer.GetStatefulExpression<CodeDoRangeExpression>();
    6464      expression.State = state;
     
    7474  ///     the loop.
    7575  ///     This is similar to CODE.DO*COUNT except that it takes its code argument from the EXEC stack. The top integer is the
    76   ///     "destination index" and the second integer is the "current index." First the code and the integer arguments are
     76  ///     "destination index" and the second integer is the "current index." Last the code and the integer arguments are
    7777  ///     saved locally
    7878  ///     and popped. Then the integers are compared. If the integers are equal then the current index is pushed onto the
     
    9898
    9999    public ExecDoRangeExpression(LoopState state) : base(state) { }
    100     public override bool Eval(IPushInterpreter interpreter) {
     100    public override bool Eval(IInternalPushInterpreter interpreter) {
    101101      return this.Eval(interpreter, interpreter.ExecStack);
    102102    }
    103     protected override LoopExpression Clone(LoopState state, IPushInterpreter interpreter) {
     103    protected override LoopExpression Clone(LoopState state, IInternalPushInterpreter interpreter) {
    104104      var expression = interpreter.PoolContainer.GetStatefulExpression<ExecDoRangeExpression>();
    105105      expression.State = state;
Note: See TracChangeset for help on using the changeset viewer.