Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/10/17 21:42:09 (7 years ago)
Author:
pkimmesw
Message:

#2665 Renamings due to typos, ManagedPool tests, Skip Noops in Debugger

File:
1 edited

Legend:

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

    r14727 r14744  
    55
    66  public abstract class PushResultExpression<T> : StatelessExpression {
    7     protected void Eval(IStack<T> stack, int count, Func<T[], T> templateFunc) {
    8       if (stack.Count < count) return;
     7    protected bool Eval(IStack<T> stack, int count, Func<T[], T> templateFunc) {
     8      if (stack.Count < count) return false;
    99
    1010      stack.PushResult(count, templateFunc);
     11      return true;
    1112    }
    1213
    13     protected void Eval(IStack<T> stack, int count, Func<T[], T> templateFunc, T ignoreValue) {
    14       if ((stack.Count < count) || stack.Top.Equals(ignoreValue)) return;
     14    protected bool Eval(IStack<T> stack, int count, Func<T[], T> templateFunc, T ignoreValue) {
     15      if ((stack.Count < count) || stack.Top.Equals(ignoreValue)) return false;
    1516
    1617      stack.PushResult(count, templateFunc);
     18      return true;
    1719    }
    1820
    19     protected void Eval<R>(IStack<T> stack, IStack<R> resultStack, int count, Func<T[], R> templateFunc) {
    20       if (stack.Count < count) return;
     21    protected bool Eval<R>(IStack<T> stack, IStack<R> resultStack, int count, Func<T[], R> templateFunc) {
     22      if (stack.Count < count) return false;
    2123
    2224      var items = stack.Pop(count);
     
    2426
    2527      resultStack.Push(result);
     28      return true;
    2629    }
    2730  }
Note: See TracChangeset for help on using the changeset viewer.