Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/22/19 16:31:11 (5 years ago)
Author:
pfleck
Message:

#3040

  • Added VectorVariable and its corresponding TreeNode.
  • Added symbols for basic vector operations and symbols for sum and avg of vectors.
  • Added a VectorEvaluate method in the SymbolicDataAnalysisExpressionTreeInterpreter that returns a DoubleVector instead of a double that is also called within the regular Evaluate method.
Location:
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols
Files:
8 copied

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorAddition.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("483AAB50-D2E9-472E-A2FA-625F621B7CA9")]
    28   [Item("Addition", "Symbol that represents the + operator.")]
    29   public sealed class Addition : Symbol {
     27  [StorableType("FD0FD140-7AED-483F-ACFC-A65FFCD4216A")]
     28  [Item("VectorAddition", "Symbol that represents the + operator.")]
     29  public sealed class VectorAddition : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = byte.MaxValue;
     
    3939
    4040    [StorableConstructor]
    41     private Addition(StorableConstructorFlag _) : base(_) { }
    42     private Addition(Addition original, Cloner cloner) : base(original, cloner) { }
     41    private VectorAddition(StorableConstructorFlag _) : base(_) { }
     42    private VectorAddition(VectorAddition original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Addition(this, cloner);
     44      return new VectorAddition(this, cloner);
    4545    }
    46     public Addition() : base("Addition", "Symbol that represents the + operator.") { }
     46    public VectorAddition() : base("VectorAddition", "Symbol that represents the + operator.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorAverage.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("8234F316-1816-41C5-94A9-11A5F3D36A77")]
    28   [Item("Sine", "Symbol that represents the sine function.")]
    29   public sealed class Sine : Symbol {
     27  [StorableType("85FF9A2E-207C-4008-BB8B-0C0363885443")]
     28  [Item("VectorAverage", "Symbol that represents the average function.")]
     29  public sealed class VectorAverage : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = 1;
     
    3939
    4040    [StorableConstructor]
    41     private Sine(StorableConstructorFlag _) : base(_) { }
    42     private Sine(Sine original, Cloner cloner) : base(original, cloner) { }
     41    private VectorAverage(StorableConstructorFlag _) : base(_) { }
     42    private VectorAverage(VectorAverage original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Sine(this, cloner);
     44      return new VectorAverage(this, cloner);
    4545    }
    46     public Sine() : base("Sine", "Symbol that represents the sine function.") { }
     46    public VectorAverage() : base("VectorAverage", "Symbol that represents the average function.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorDivision.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("EE4A9CF4-483A-4671-AEA2-03E3DAF2F976")]
    28   [Item("Division", "Symbol that represents the / operator.")]
    29   public sealed class Division : Symbol {
     27  [StorableType("AC2706D7-40FF-4BB2-A7C9-1EE83EFF2D83")]
     28  [Item("VectorDivision", "Symbol that represents the / operator.")]
     29  public sealed class VectorDivision : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = byte.MaxValue;
     
    3939
    4040    [StorableConstructor]
    41     private Division(StorableConstructorFlag _) : base(_) { }
    42     private Division(Division original, Cloner cloner) : base(original, cloner) { }
     41    private VectorDivision(StorableConstructorFlag _) : base(_) { }
     42    private VectorDivision(VectorDivision original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Division(this, cloner);
     44      return new VectorDivision(this, cloner);
    4545    }
    46     public Division() : base("Division", "Symbol that represents the / operator.") { }
     46    public VectorDivision() : base("VectorDivision", "Symbol that represents the / operator.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorMultiplication.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("8F054D7F-82D0-400A-BAE3-8C90EA709C34")]
    28   [Item("Multiplication", "Symbol that represents the * operator.")]
    29   public sealed class Multiplication : Symbol {
     27  [StorableType("B3CD0680-162D-49F6-9D23-0F8730704050")]
     28  [Item("VectorMultiplication", "Symbol that represents the * operator.")]
     29  public sealed class VectorMultiplication : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = byte.MaxValue;
     
    3939
    4040    [StorableConstructor]
    41     private Multiplication(StorableConstructorFlag _) : base(_) { }
    42     private Multiplication(Multiplication original, Cloner cloner) : base(original, cloner) { }
     41    private VectorMultiplication(StorableConstructorFlag _) : base(_) { }
     42    private VectorMultiplication(VectorMultiplication original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Multiplication(this, cloner);
     44      return new VectorMultiplication(this, cloner);
    4545    }
    46     public Multiplication() : base("Multiplication", "Symbol that represents the * operator.") { }
     46    public VectorMultiplication() : base("VectorMultiplication", "Symbol that represents the * operator.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorSubtraction.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("F50263D4-2B07-42C8-8AB6-297A54AE00CC")]
    28   [Item("Subtraction", "Symbol that represents the - operator.")]
    29   public sealed class Subtraction : Symbol {
     27  [StorableType("8700841D-3303-42E5-A71A-A941B4CF707E")]
     28  [Item("VectorSubtraction", "Symbol that represents the - operator.")]
     29  public sealed class VectorSubtraction : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = byte.MaxValue;
     
    3939
    4040    [StorableConstructor]
    41     private Subtraction(StorableConstructorFlag _) : base(_) { }
    42     private Subtraction(Subtraction original, Cloner cloner) : base(original, cloner) { }
     41    private VectorSubtraction(StorableConstructorFlag _) : base(_) { }
     42    private VectorSubtraction(VectorSubtraction original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Subtraction(this, cloner);
     44      return new VectorSubtraction(this, cloner);
    4545    }
    46     public Subtraction() : base("Subtraction", "Symbol that represents the - operator.") { }
     46    public VectorSubtraction() : base("VectorSubtraction", "Symbol that represents the - operator.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorSum.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("8234F316-1816-41C5-94A9-11A5F3D36A77")]
    28   [Item("Sine", "Symbol that represents the sine function.")]
    29   public sealed class Sine : Symbol {
     27  [StorableType("FD700096-C848-4841-BAF3-B89C4200EE5C")]
     28  [Item("VectorSum", "Symbol that represents the sum function.")]
     29  public sealed class VectorSum : Symbol {
    3030    private const int minimumArity = 1;
    3131    private const int maximumArity = 1;
     
    3939
    4040    [StorableConstructor]
    41     private Sine(StorableConstructorFlag _) : base(_) { }
    42     private Sine(Sine original, Cloner cloner) : base(original, cloner) { }
     41    private VectorSum(StorableConstructorFlag _) : base(_) { }
     42    private VectorSum(VectorSum original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
    44       return new Sine(this, cloner);
     44      return new VectorSum(this, cloner);
    4545    }
    46     public Sine() : base("Sine", "Symbol that represents the sine function.") { }
     46    public VectorSum() : base("VectorSum", "Symbol that represents the sum function.") { }
    4747  }
    4848}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorVariable.cs

    r17362 r17367  
    2525using HEAL.Attic;
    2626namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    27   [StorableType("9072AE0E-FA62-48D2-A416-F678D6CC2CBC")]
     27  [StorableType("B7E7393D-95BC-434D-862C-670C9FCF8328")]
    2828  [Item("Variable", "Represents a variable value.")]
    29   public sealed class Variable : VariableBase {
     29  public sealed class VectorVariable : VariableBase {
    3030
    3131    [StorableConstructor]
    32     private Variable(StorableConstructorFlag _) : base(_) {
     32    private VectorVariable(StorableConstructorFlag _) : base(_) {
    3333    }
    34     private Variable(Variable original, Cloner cloner)
     34    private VectorVariable(Variable original, Cloner cloner)
    3535      : base(original, cloner) {
    3636    }
    37     public Variable() : base("Variable", "Represents a variable value.") { }
    38     public Variable(string name, string description) : base(name, description) { }
     37    public VectorVariable() : base("VectorVariable", "Represents a variable value.") { }
     38    public VectorVariable(string name, string description) : base(name, description) { }
    3939
    4040    public override ISymbolicExpressionTreeNode CreateTreeNode() {
    41       return new VariableTreeNode(this);
     41      return new VectorVariableTreeNode(this);
    4242    }
    4343
    4444    public override IDeepCloneable Clone(Cloner cloner) {
    45       return new Variable(this, cloner);
     45      return new VectorVariable(this, cloner);
    4646    }
    4747  }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VectorVariableTreeNode.cs

    r17362 r17367  
    2323using HEAL.Attic;
    2424namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    25   [StorableType("E60C4216-A6BA-48DE-BA66-389B9946B70A")]
    26   public sealed class VariableTreeNode : VariableTreeNodeBase {
    27     public new Variable Symbol {
    28       get { return (Variable)base.Symbol; }
     25  [StorableType("C0C60572-E014-43D5-B06C-53F3DE6FD54A")]
     26  public sealed class VectorVariableTreeNode : VariableTreeNodeBase {
     27    public new VectorVariable Symbol {
     28      get { return (VectorVariable)base.Symbol; }
    2929    }
    3030    [StorableConstructor]
    31     private VariableTreeNode(StorableConstructorFlag _) : base(_) { }
    32     private VariableTreeNode(VariableTreeNode original, Cloner cloner)
     31    private VectorVariableTreeNode(StorableConstructorFlag _) : base(_) { }
     32    private VectorVariableTreeNode(VectorVariableTreeNode original, Cloner cloner)
    3333      : base(original, cloner) {
    3434    }
    35     private VariableTreeNode() { }
    36     public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { }
     35    private VectorVariableTreeNode() { }
     36    public VectorVariableTreeNode(VectorVariable variableSymbol) : base(variableSymbol) { }
    3737
    3838    public override IDeepCloneable Clone(Cloner cloner) {
    39       return new VariableTreeNode(this, cloner);
     39      return new VectorVariableTreeNode(this, cloner);
    4040    }
    4141  }
Note: See TracChangeset for help on using the changeset viewer.