Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubFunctionSymbol.cs

Last change on this file was 18220, checked in by gkronber, 3 years ago

#3136: reintegrated structure-template GP branch into trunk

File size: 986 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("SubFunction", "Symbol that represents a sub function.")]
9  public sealed class SubFunctionSymbol : Symbol {
10    public override int MinimumArity => 0;
11    public override int MaximumArity => 1;
12
13    public SubFunctionSymbol() : base("SubFunction", "Symbol that represents a sub function.") { }
14
15    private SubFunctionSymbol(SubFunctionSymbol original, Cloner cloner) : base(original, cloner) { }
16
17    [StorableConstructor]
18    private SubFunctionSymbol(StorableConstructorFlag _) : base(_) { }
19
20    public override IDeepCloneable Clone(Cloner cloner) =>
21      new SubFunctionSymbol(this, cloner);
22
23    public override ISymbolicExpressionTreeNode CreateTreeNode() => new SubFunctionTreeNode(this);
24  }
25}
Note: See TracBrowser for help on using the repository browser.