Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/28/21 13:37:43 (3 years ago)
Author:
pfleck
Message:

#3040 Added a subvector symbol with ranges as subtrees.

Location:
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols
Files:
2 edited

Legend:

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

    r17726 r18060  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HEAL.Attic;
     26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2527
    2628namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    2729  [StorableType("4E9511C6-0FA4-496D-9610-35D9F779F899")]
    28   [Item("SubVector", "Symbol that represents SubVector sum function.")]
    29   public sealed class SubVector : WindowedSymbol {
    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     }
     30  [Item("SubVector", "Symbol that represent the SubVector function with local parameters.")]
     31  public class SubVector : WindowedSymbol {
     32    public override int MinimumArity => 1;
     33    public override int MaximumArity => 1;
    3934
    4035    [StorableConstructor]
    41     private SubVector(StorableConstructorFlag _) : base(_) { }
    42     private SubVector(SubVector original, Cloner cloner) : base(original, cloner) { }
     36    protected SubVector(StorableConstructorFlag _) : base(_) { }
     37
     38    protected SubVector(SubVector original, Cloner cloner) : base(original, cloner) { }
     39
    4340    public override IDeepCloneable Clone(Cloner cloner) {
    4441      return new SubVector(this, cloner);
    4542    }
    46     public SubVector() : base("SubVector", "Symbol that represents the SubVector function.") { }
     43
     44    public SubVector() : base("SubVector", "Symbol that represent the SubVector function with local parameters.") {
     45      EnableWindowing = true;
     46    }
     47  }
     48
     49  [StorableType("BA11A829-3236-46C3-AE83-9FA8511D8E8C")]
     50  [Item("SubVectorSubtree", "Symbol that represent the SubVector function with subtrees.")]
     51  public sealed class SubVectorSubtree : Symbol {
     52    public override int MinimumArity => 3;
     53    public override int MaximumArity => 3;
     54
     55    [StorableConstructor]
     56    private SubVectorSubtree(StorableConstructorFlag _) : base(_) { }
     57    private SubVectorSubtree(SubVectorSubtree original, Cloner cloner) : base(original, cloner) { }
     58    public override IDeepCloneable Clone(Cloner cloner) { return new SubVectorSubtree(this, cloner); }
     59    public SubVectorSubtree() : base("SubVectorSubtree", "Symbol that represent the SubVector function with subtrees.") { }
    4760  }
    4861}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/WindowedSymbol.cs

    r17726 r18060  
    158158
    159159      offsetMu = 0.0;
    160       offsetSigma = 0.05;
     160      offsetSigma = 0.2;
    161161      lengthMu = 1.0;
    162       lengthSigma = 0.05;
     162      lengthSigma = 0.2;
    163163
    164164      manipulatorOffsetMu = 0.0;
Note: See TracChangeset for help on using the changeset viewer.