Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/20/11 11:12:10 (13 years ago)
Author:
mkommend
Message:

#1479: Merged grammar editor branch into trunk.

Location:
trunk/sources
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic

    • Property svn:ignore set to
      bin
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Addition.cs

    r5809 r6803  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
     24using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    25 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    2727  [StorableClass]
    2828  [Item("Addition", "Symbol that represents the + operator.")]
    2929  public sealed class Addition : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Addition(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/And.cs

    r5809 r6803  
    2828  [Item("And", "Symbol that represents the boolean AND operator.")]
    2929  public sealed class And : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 And(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Average.cs

    r5809 r6803  
    2828  [Item("Average", "Symbol that represents the average (arithmetic mean) function.")]
    2929  public sealed class Average : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Average(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs

    r5809 r6803  
    8888    }
    8989
     90    private const int minimumArity = 0;
     91    private const int maximumArity = 0;
     92
     93    public override int MinimumArity {
     94      get { return minimumArity; }
     95    }
     96    public override int MaximumArity {
     97      get { return maximumArity; }
     98    }
    9099    #endregion
     100
    91101    [StorableConstructor]
    92102    private Constant(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Cosine.cs

    r5809 r6803  
    2828  [Item("Cosine", "Symbol that represents the cosine function.")]
    2929  public sealed class Cosine : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Cosine(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Derivative.cs

    r5809 r6803  
    2828  [Item("Derivative", "Represents the derivative over the specified subtree.")]
    2929  public sealed class Derivative : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Derivative(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Division.cs

    r5809 r6803  
    2828  [Item("Division", "Symbol that represents the / operator.")]
    2929  public sealed class Division : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Division(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Exponential.cs

    r5809 r6803  
    2828  [Item("Exponential", "Symbol that represents the exponential function.")]
    2929  public sealed class Exponential : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Exponential(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/GreaterThan.cs

    r5809 r6803  
    2828  [Item("GreaterThan", "Symbol that represents a greater than relation.")]
    2929  public sealed class GreaterThan : Symbol {
     30    private const int minimumArity = 2;
     31    private const int maximumArity = 2;
     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 GreaterThan(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/IfThenElse.cs

    r5809 r6803  
    2828  [Item("IfThenElse", "Symbol that represents a conditional operator.")]
    2929  public sealed class IfThenElse : 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 IfThenElse(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Integral.cs

    r5809 r6803  
    2727  [Item("Integral", "Represents the integral over the specified subtree.")]
    2828  public sealed class Integral : LaggedSymbol {
     29    private const int minimumArity = 1;
     30    private const int maximumArity = 1;
     31
     32    public override int MinimumArity {
     33      get { return minimumArity; }
     34    }
     35    public override int MaximumArity {
     36      get { return maximumArity; }
     37    }
     38
    2939    [StorableConstructor]
    3040    private Integral(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/LessThan.cs

    r5809 r6803  
    2828  [Item("LessThan", "Symbol that represents a less than relation.")]
    2929  public sealed class LessThan : Symbol {
     30    private const int minimumArity = 2;
     31    private const int maximumArity = 2;
     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 LessThan(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Logarithm.cs

    r5809 r6803  
    2828  [Item("Logarithm", "Symbol that represents the logarithm function.")]
    2929  public sealed class Logarithm : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Logarithm(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Multiplication.cs

    r5809 r6803  
    2828  [Item("Multiplication", "Symbol that represents the * operator.")]
    2929  public sealed class Multiplication : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Multiplication(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Not.cs

    r5809 r6803  
    2828  [Item("Not", "Symbol that represents the boolean NOT operator.")]
    2929  public sealed class Not : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Not(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Or.cs

    r5809 r6803  
    2828  [Item("Or", "Symbol that represents the boolean OR operator.")]
    2929  public sealed class Or : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Or(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Power.cs

    r5809 r6803  
    2828  [Item("Power", "Symbol that represents the power function.")]
    2929  public sealed class Power : Symbol {
     30    private const int minimumArity = 2;
     31    private const int maximumArity = 2;
     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 Power(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Root.cs

    r5809 r6803  
    2828  [Item("Root", "Symbol that represents the n-th root function.")]
    2929  public sealed class Root : Symbol {
     30    private const int minimumArity = 2;
     31    private const int maximumArity = 2;
     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 Root(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Sine.cs

    r5809 r6803  
    2828  [Item("Sine", "Symbol that represents the sine function.")]
    2929  public sealed class Sine : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Sine(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Subtraction.cs

    r5809 r6803  
    2828  [Item("Subtraction", "Symbol that represents the - operator.")]
    2929  public sealed class Subtraction : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = byte.MaxValue;
     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 Subtraction(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Tangent.cs

    r5809 r6803  
    2828  [Item("Tangent", "Symbol that represents the tangent trigonometric function.")]
    2929  public sealed class Tangent : Symbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 Tangent(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/TimeLag.cs

    r5809 r6803  
    2828  [Item("TimeLag", "Represents a symblol whose evaluation is shifted.")]
    2929  public sealed class TimeLag : LaggedSymbol {
     30    private const int minimumArity = 1;
     31    private const int maximumArity = 1;
     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 TimeLag(bool deserializing) : base(deserializing) { }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Variable.cs

    r5809 r6803  
    100100      }
    101101    }
     102
     103    private const int minimumArity = 0;
     104    private const int maximumArity = 0;
     105
     106    public override int MinimumArity {
     107      get { return minimumArity; }
     108    }
     109    public override int MaximumArity {
     110      get { return maximumArity; }
     111    }
    102112    #endregion
     113
    103114    [StorableConstructor]
    104115    protected Variable(bool deserializing)
     
    126137    }
    127138
     139    protected override void OnChanged(EventArgs e) {
     140      if (@Fixed) {
     141        weightManipulatorMu = 1;
     142        weightManipulatorSigma = 0;
     143        weightMu = 1;
     144        weightSigma = 0;
     145        multiplicativeWeightManipulatorSigma = 0;
     146      }
     147      base.OnChanged(e);
     148    }
     149
    128150    public override ISymbolicExpressionTreeNode CreateTreeNode() {
    129151      return new VariableTreeNode(this);
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableCondition.cs

    r5809 r6803  
    138138      }
    139139    }
     140
     141    private const int minimumArity = 2;
     142    private const int maximumArity = 2;
     143
     144    public override int MinimumArity {
     145      get { return minimumArity; }
     146    }
     147    public override int MaximumArity {
     148      get { return maximumArity; }
     149    }
    140150    #endregion
    141151
Note: See TracChangeset for help on using the changeset viewer.