Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubVector.cs @ 18242

Last change on this file since 18242 was 18060, checked in by pfleck, 3 years ago

#3040 Added a subvector symbol with ranges as subtrees.

File size: 2.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using HeuristicLab.Common;
24using HeuristicLab.Core;
25using HEAL.Attic;
26using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
27
28namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
29  [StorableType("4E9511C6-0FA4-496D-9610-35D9F779F899")]
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;
34
35    [StorableConstructor]
36    protected SubVector(StorableConstructorFlag _) : base(_) { }
37
38    protected SubVector(SubVector original, Cloner cloner) : base(original, cloner) { }
39
40    public override IDeepCloneable Clone(Cloner cloner) {
41      return new SubVector(this, cloner);
42    }
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.") { }
60  }
61}
Note: See TracBrowser for help on using the repository browser.