Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 10:42:57 (14 years ago)
Author:
mkommend
Message:

#1540: Added min and max arity to symbols and renamed SymbolicExpressionTreeNode.SubtreesCount to SymbolicExpressionTreeNode.SubtreeCount.

Location:
branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/IfFoodAhead.cs

    r5809 r6387  
    2828  [Item("IfFoodAhead", "Represents the if-food-ahead symbol in a artificial ant expression.")]
    2929  public sealed class IfFoodAhead : Symbol {
     30    private const int minimumArity = 2;
     31    private const int maximumArity = 3;
     32
     33    public override int MinimumArity {
     34      get { return minimumArity; }
     35    }
     36    public override int MaximumArity {
     37      get { return maximumArity; }
     38    }
     39
    3040    [StorableConstructor]
    3141    private IfFoodAhead(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Left.cs

    r5809 r6387  
    2828  [Item("Left", "Represents the turn-left symbol in a artificial ant expression.")]
    2929  public sealed class Left : Symbol {
     30    private const int minimumArity = 0;
     31    private const int maximumArity = 0;
     32
     33    public override int MinimumArity {
     34      get { return minimumArity; }
     35    }
     36    public override int MaximumArity {
     37      get { return maximumArity; }
     38    }
     39
    3040    [StorableConstructor]
    3141    private Left(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Move.cs

    r5809 r6387  
    2828  [Item("Move", "Represents the move-forward symbol in a artificial ant expression.")]
    2929  public sealed class Move : Symbol {
     30    private const int minimumArity = 0;
     31    private const int maximumArity = 0;
     32
     33    public override int MinimumArity {
     34      get { return minimumArity; }
     35    }
     36    public override int MaximumArity {
     37      get { return maximumArity; }
     38    }
     39
    3040    [StorableConstructor]
    3141    private Move(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog2.cs

    r5809 r6387  
    2929  [Item("Prog2", "Represents the sequence symbol with 2 sub-trees in a artificial ant expression.")]
    3030  public sealed class Prog2 : Symbol {
     31    private const int minimumArity = 2;
     32    private const int maximumArity = 2;
     33
     34    public override int MinimumArity {
     35      get { return minimumArity; }
     36    }
     37    public override int MaximumArity {
     38      get { return maximumArity; }
     39    }
     40
    3141    [StorableConstructor]
    3242    private Prog2(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog3.cs

    r5809 r6387  
    2828  [Item("Prog3", "Represents the sequence symbol with 3 sub-trees in a artificial ant expression.")]
    2929  public sealed class Prog3 : Symbol {
     30    private const int minimumArity = 3;
     31    private const int maximumArity = 3;
     32
     33    public override int MinimumArity {
     34      get { return minimumArity; }
     35    }
     36    public override int MaximumArity {
     37      get { return maximumArity; }
     38    }
     39
    3040    [StorableConstructor]
    3141    private Prog3(bool deserializing) : base(deserializing) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Right.cs

    r5809 r6387  
    2828  [Item("Right", "Represents the turn-right symbol in a artificial ant expression.")]
    2929  public sealed class Right : Symbol {
     30    private const int minimumArity = 0;
     31    private const int maximumArity = 0;
     32
     33    public override int MinimumArity {
     34      get { return minimumArity; }
     35    }
     36    public override int MaximumArity {
     37      get { return maximumArity; }
     38    }
     39
    3040    [StorableConstructor]
    3141    private Right(bool deserializing) : base(deserializing) { }
Note: See TracChangeset for help on using the changeset viewer.