Free cookie consent management tool by TermsFeed Policy Generator

source: tags/3.3.7/HeuristicLab.Problems.LawnMower/3.3/Symbols/Prog.cs @ 10293

Last change on this file since 10293 was 8059, checked in by gkronber, 12 years ago

#1876: initial import of the lawn mower demo problem for GP.

File size: 1.7 KB
Line 
1/* HeuristicLab
2 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
3 *
4 * This file is part of HeuristicLab.
5 *
6 * HeuristicLab is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * HeuristicLab is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21using HeuristicLab.Common;
22using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
23using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
24
25namespace HeuristicLab.Problems.LawnMower {
26  [StorableClass]
27  public sealed class Prog : Symbol {
28    public override int MinimumArity {
29      get { return 2; }
30    }
31    public override int MaximumArity {
32      get { return 2; }
33    }
34    [StorableConstructor]
35    private Prog(bool deserializing) : base(deserializing) { }
36    private Prog(Prog original, Cloner cloner)
37      : base(original, cloner) {
38    }
39
40    public Prog()
41      : base("Prog", "Prog executes two branches sequentially and returns the result of the last branch.") {
42    }
43    [StorableHook(HookType.AfterDeserialization)]
44    private void AfterDeserialization() {
45    }
46    public override IDeepCloneable Clone(Cloner cloner) {
47      return new Prog(this, cloner);
48    }
49  }
50}
Note: See TracBrowser for help on using the repository browser.