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

    r14777 r14834  
    11namespace HeuristicLab.Problems.ProgramSynthesis.Push.Expressions {
     2  using System.Collections.Generic;
     3
    24  using HeuristicLab.Problems.ProgramSynthesis.Push.Interpreter;
    35  using HeuristicLab.Problems.ProgramSynthesis.Push.Stack;
     
    79    protected PushExpression(T state) : base(state) { }
    810
    9     protected bool Eval(IStack<T> stack) {
     11    protected bool Eval(IPushStack<T> stack) {
    1012      stack.Push(this.State);
    1113      return true;
     
    2022    }
    2123
    22     public override bool Eval(IPushInterpreter interpreter) {
     24    public override bool Eval(IInternalPushInterpreter interpreter) {
    2325      return Eval(interpreter.IntegerStack);
    2426    }
     
    3032    }
    3133
    32     public override bool Eval(IPushInterpreter interpreter) {
     34    public override bool Eval(IInternalPushInterpreter interpreter) {
    3335      return Eval(interpreter.FloatStack);
    3436    }
     
    4042    }
    4143
    42     public override bool Eval(IPushInterpreter interpreter) {
     44    public override bool Eval(IInternalPushInterpreter interpreter) {
    4345      return Eval(interpreter.BooleanStack);
    4446    }
     
    5052    }
    5153
    52     public override bool Eval(IPushInterpreter interpreter) {
     54    public override bool Eval(IInternalPushInterpreter interpreter) {
    5355      return Eval(interpreter.NameStack);
    5456    }
     
    6062    }
    6163
    62     public override bool Eval(IPushInterpreter interpreter) {
     64    public override bool Eval(IInternalPushInterpreter interpreter) {
    6365      return Eval(interpreter.ExecStack);
    6466    }
     
    7072    }
    7173
    72     public override bool Eval(IPushInterpreter interpreter) {
     74    public override bool Eval(IInternalPushInterpreter interpreter) {
    7375      return Eval(interpreter.CharStack);
    7476    }
     
    8082    }
    8183
    82     public override bool Eval(IPushInterpreter interpreter) {
     84    public override bool Eval(IInternalPushInterpreter interpreter) {
    8385      return Eval(interpreter.StringStack);
    8486    }
    8587  }
     88
     89  public class IntegerVectorPushExpression : PushExpression<List<long>> {
     90    public IntegerVectorPushExpression(List<long> state)
     91      : base(state) {
     92    }
     93
     94    public override bool Eval(IInternalPushInterpreter interpreter) {
     95      return Eval(interpreter.IntegerVectorStack);
     96    }
     97  }
    8698}
Note: See TracChangeset for help on using the changeset viewer.