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.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Argument.cs

    r6233 r6387  
    3232    public const string ArgumentName = "Argument";
    3333    public const string ArgumentDescription = "Symbol that represents a function argument.";
     34    private const int minimumArity = 0;
     35    private const int maximumArity = 0;
     36
     37    public override int MinimumArity {
     38      get { return minimumArity; }
     39    }
     40    public override int MaximumArity {
     41      get { return maximumArity; }
     42    }
     43
    3444    [Storable]
    3545    private int argumentIndex;
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Defun.cs

    r5809 r6387  
    3232    public const string DefunName = "Defun";
    3333    public const string DefunDescription = "Symbol that represents a function defining node.";
     34    private const int minimumArity = 1;
     35    private const int maximumArity = 1;
     36
     37    public override int MinimumArity {
     38      get { return minimumArity; }
     39    }
     40    public override int MaximumArity {
     41      get { return maximumArity; }
     42    }
    3443
    3544    [StorableConstructor]
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs

    r6377 r6387  
    2828namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
    2929  public sealed class GroupSymbol : 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    private ObservableSet<ISymbol> symbols;
    3141    public IObservableSet<ISymbol> SymbolsCollection {
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/InvokeFunction.cs

    r6233 r6387  
    3232    public const string InvokeFunctionName = "InvokeFunction";
    3333    public const string InvokeFunctionDescription = "Symbol that the invocation of another function.";
     34    private const int minimumArity = 0;
     35    private const int maximumArity = byte.MaxValue;
     36
     37    public override int MinimumArity {
     38      get { return minimumArity; }
     39    }
     40    public override int MaximumArity {
     41      get { return maximumArity; }
     42    }
    3443
    3544    [Storable]
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/ProgramRootSymbol.cs

    r5809 r6387  
    2929    public const string ProgramRootSymbolName = "ProgramRootSymbol";
    3030    public const string ProgramRootSymbolDescription = "Special symbol that represents the program root node of a symbolic expression tree.";
     31    private const int minimumArity = 1;
     32    private const int maximumArity = byte.MaxValue;
     33
     34    public override int MinimumArity {
     35      get { return minimumArity; }
     36    }
     37    public override int MaximumArity {
     38      get { return maximumArity; }
     39    }
    3140
    3241    [StorableConstructor]
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/StartSymbol.cs

    r5809 r6387  
    2929    public const string StartSymbolName = "StartSymbol";
    3030    public const string StartSymbolDescription = "Special symbol that represents the starting node of the result producing branch of a symbolic expression tree.";
     31    private const int minimumArity = 1;
     32    private const int maximumArity = 1;
     33
     34    public override int MinimumArity {
     35      get { return minimumArity; }
     36    }
     37    public override int MaximumArity {
     38      get { return maximumArity; }
     39    }
    3140
    3241    [StorableConstructor]
    33     private StartSymbol(bool deserializing) : base(deserializing) { }
     42    private StartSymbol(bool deserializing)
     43      : base(deserializing) {
     44    }
    3445    private StartSymbol(StartSymbol original, Cloner cloner) : base(original, cloner) { }
    3546    public StartSymbol() : base(StartSymbol.StartSymbolName, StartSymbol.StartSymbolDescription) { }
  • branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs

    r6299 r6387  
    7373      get { return false; }
    7474    }
     75
     76    public abstract int MinimumArity { get; }
     77    public abstract int MaximumArity { get; }
    7578    #endregion
    7679
Note: See TracChangeset for help on using the changeset viewer.