Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/Integer/IntegerMinExpression.cs @ 14320

Last change on this file since 14320 was 14320, checked in by pkimmesw, 8 years ago

#2665 Added Interpreter, Parser, 16 Examples, Expressions needed for the examples

File size: 471 bytes
Line 
1using System;
2using HeuristicLab.Algorithms.PushGP.Stack;
3
4namespace HeuristicLab.Algorithms.PushGP.Expressions
5{
6    public class IntegerMinExpression : Expression
7    {
8        public IntegerMinExpression() : base(OpCode.IntegerMin)
9        { }
10
11        public override void Eval(IInterpreterService interpreterService)
12        {
13            PushResult(interpreterService.IntegerStack, 2, values => Math.Min(values[1], values[0]));
14        }
15    }
16}
Note: See TracBrowser for help on using the repository browser.