Last change
on this file since 14323 was
14323,
checked in by pkimmesw, 7 years ago
|
#2665 Added Unit Test Project, CodeGenerator and refactored project structure
|
File size:
604 bytes
|
Line | |
---|
1 | using HeuristicLab.Algorithms.PushGP.Stack;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Algorithms.PushGP.Expressions
|
---|
4 | {
|
---|
5 | public class FloatPushExpression : Expression
|
---|
6 | {
|
---|
7 | public FloatPushExpression(double value) : base(OpCode.FloatPush)
|
---|
8 | {
|
---|
9 | this.Value = value;
|
---|
10 | }
|
---|
11 |
|
---|
12 | public double Value { get; }
|
---|
13 |
|
---|
14 | public override void Eval(IInterpreterService interpreterService)
|
---|
15 | {
|
---|
16 | interpreterService.FloatStack.Push(Value);
|
---|
17 | }
|
---|
18 |
|
---|
19 | public override string ToString()
|
---|
20 | {
|
---|
21 | return $"{this.Value}";
|
---|
22 | }
|
---|
23 | }
|
---|
24 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.