Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/16/16 23:14:01 (8 years ago)
Author:
pkimmesw
Message:

#2665 Expressions are splitted into StatefullExpressions and StatelessExpressions, Added traits for tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.Algorithms.PushGP/HeuristicLab.Algorithms.PushGP/Expressions/RandExpressions.cs

    r14392 r14398  
    77    /// Pushes a random NAME.
    88    /// </summary>
    9     public class NameRandExpression : Expression
     9    public class NameRandExpression : StatelessExpression
    1010    {
    11         public NameRandExpression() : base("NAME.RAND")
    12         {
    13         }
     11        protected override string InitStringRepresentation() { return "NAME.RAND"; }
    1412
    1513        public override void Eval(IInterpreter interpreter)
     
    2422    /// Pushes a random integer.
    2523    /// </summary>
    26     public class IntegerRandExpression : Expression
     24    public class IntegerRandExpression : StatelessExpression
    2725    {
    28         public IntegerRandExpression() : base("INTEGER.RAND")
    29         {
    30         }
     26        protected override string InitStringRepresentation() { return "INTEGER.RAND"; }
    3127
    3228        public override void Eval(IInterpreter interpreter)
     
    4339    /// Pushes a random float.
    4440    /// </summary>
    45     public class FloatRandExpression : Expression
     41    public class FloatRandExpression : StatelessExpression
    4642    {
    47         public FloatRandExpression() : base("FLOAT.RAND")
    48         {
    49         }
     43        protected override string InitStringRepresentation() { return "FLOAT.RAND"; }
    5044
    5145        public override void Eval(IInterpreter interpreter)
     
    6256    /// Pushes a random boolean.
    6357    /// </summary>
    64     public class BooleanRandExpression : Expression
     58    public class BooleanRandExpression : StatelessExpression
    6559    {
    66         public BooleanRandExpression() : base("BOOLEAN.RAND")
    67         {
    68         }
     60        protected override string InitStringRepresentation() { return "BOOLEAN.RAND"; }
    6961
    7062        public override void Eval(IInterpreter interpreter)
     
    7971    /// Pushes random expressions onto the code stack.
    8072    /// </summary>
    81     public class CodeRandExpression : Expression
     73    public class CodeRandExpression : StatelessExpression
    8274    {
    83         public CodeRandExpression() : base("CODE.RAND")
    84         {
    85         }
     75        protected override string InitStringRepresentation() { return "CODE.RAND"; }
    8676
    8777        public override void Eval(IInterpreter interpreter)
Note: See TracChangeset for help on using the changeset viewer.