Changeset 14328 for branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Expression.cs
- Timestamp:
- 10/08/16 12:04:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Expression.cs
r14323 r14328 1 1 using System; 2 2 using System.Collections.Generic; 3 using HeuristicLab.Algorithms.PushGP.Interpreter; 3 4 using HeuristicLab.Algorithms.PushGP.Stack; 4 5 … … 7 8 public abstract class Expression 8 9 { 9 public Expression(OpCode opCode) 10 { 11 this.OpCode = opCode; 12 } 10 public abstract bool IsCodeOp { get; } 11 public abstract void Eval(IInterpreter interpreter); 13 12 14 public OpCode OpCode { get; } 15 16 public abstract void Eval(IInterpreterService interpreterService); 17 18 public override string ToString() 19 { 20 return SymbolTable.GetSymbol(this.OpCode); 21 } 22 23 protected static void PushResult<T>(IStack<T> stack, int count, Func<T[], T> templateFunc) 13 public void PushResult<T>(IStack<T> stack, int count, Func<T[], T> templateFunc) 24 14 { 25 15 PushResult(stack, stack, count, templateFunc); 26 16 } 27 17 28 p rotected static void PushResult<T, R>(IStack<T> sourceStack, IStack<R> targetStack, int count, Func<T[], R> templateFunc)18 public void PushResult<T, R>(IStack<T> sourceStack, IStack<R> targetStack, int count, Func<T[], R> templateFunc) 29 19 { 30 20 // not enough arguments on stack … … 38 28 } 39 29 40 p rotected static void Duplicate<T>(IStack<T> stack)30 public void Duplicate<T>(IStack<T> stack) 41 31 { 42 32 // not enough arguments on stack
Note: See TracChangeset
for help on using the changeset viewer.