source: branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubFunctionSymbol.cs @ 18062

Last change on this file since 18062 was 18062, checked in by dpiringe, 9 months ago

#3136

  • added a new Symbol SubFunctionSymbol for sub functions
  • modified InfixExpressionParser to support SubFunctionSymbol (parsing of variableNames still in work)
  • modified StructuredSymbolicRegressionSingleObjectiveProblem to extract sub functions and add them to MultiEncoding
File size: 888 bytes
Line 
1using HEAL.Attic;
2using HeuristicLab.Common;
3using HeuristicLab.Core;
4using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
5
6namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
7  [StorableType("C6C2FBEE-8F4B-4FF2-80F5-D566BE55ED69")]
8  [Item("SubFunctionSymbol", "Symbol that represents a sub function.")]
9  public class SubFunctionSymbol : Symbol {
10    public override int MinimumArity => 1;
11    public override int MaximumArity => 1;
12
13    public SubFunctionSymbol() : base("SubFunctionSymbol", "Symbol that represents a sub function.") { }
14
15    private SubFunctionSymbol(SubFunctionSymbol original, Cloner cloner) : base(original, cloner) { }
16
17    [StorableConstructor]
18    public SubFunctionSymbol(StorableConstructorFlag _) : base(_) { }
19
20    public override IDeepCloneable Clone(Cloner cloner) =>
21      new SubFunctionSymbol(this, cloner);
22  }
23}
Note: See TracBrowser for help on using the repository browser.