[13865] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
| 3 | * Copyright (C) 2002-2015 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 |
|
---|
| 22 | using System;
|
---|
| 23 | using System.Collections.Generic;
|
---|
| 24 | using HeuristicLab.Common;
|
---|
| 25 | using HeuristicLab.Core;
|
---|
| 26 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
| 27 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 28 |
|
---|
| 29 | namespace HeuristicLab.Problems.GeneticProgramming.GlucosePrediction {
|
---|
| 30 | [StorableClass]
|
---|
| 31 | [Item(Name, "")]
|
---|
| 32 | public class RealInsulineVariableSymbol : Symbol {
|
---|
| 33 | public new const string Name = "RealInsulineVariableSymbol";
|
---|
| 34 | #region Properties
|
---|
| 35 |
|
---|
| 36 | [Storable]
|
---|
| 37 | private int minRowOffset;
|
---|
| 38 | public int MinRowOffset {
|
---|
| 39 | get { return minRowOffset; }
|
---|
| 40 | set {
|
---|
| 41 | if (value != minRowOffset) {
|
---|
| 42 | minRowOffset = value;
|
---|
| 43 | OnChanged(EventArgs.Empty);
|
---|
| 44 | }
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | [Storable]
|
---|
| 49 | private int maxRowOffset;
|
---|
| 50 |
|
---|
| 51 | public int MaxRowOffset {
|
---|
| 52 | get { return maxRowOffset; }
|
---|
| 53 | set {
|
---|
| 54 | if (value != maxRowOffset) {
|
---|
| 55 | maxRowOffset = value;
|
---|
| 56 | OnChanged(EventArgs.Empty);
|
---|
| 57 | }
|
---|
| 58 | }
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | private const int minimumArity = 0;
|
---|
| 62 | private const int maximumArity = 0;
|
---|
| 63 |
|
---|
| 64 | public override int MinimumArity {
|
---|
| 65 | get { return minimumArity; }
|
---|
| 66 | }
|
---|
| 67 |
|
---|
| 68 | public override int MaximumArity {
|
---|
| 69 | get { return maximumArity; }
|
---|
| 70 | }
|
---|
| 71 | #endregion
|
---|
| 72 |
|
---|
| 73 | [StorableHook(HookType.AfterDeserialization)]
|
---|
| 74 | private void AfterDeserialization() {
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | [StorableConstructor]
|
---|
| 78 | protected RealInsulineVariableSymbol(bool deserializing)
|
---|
| 79 | : base(deserializing) {
|
---|
| 80 | }
|
---|
| 81 |
|
---|
| 82 | protected RealInsulineVariableSymbol(RealInsulineVariableSymbol original, Cloner cloner)
|
---|
| 83 | : base(original, cloner) {
|
---|
| 84 | minRowOffset = original.minRowOffset;
|
---|
| 85 | maxRowOffset = original.maxRowOffset;
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | public RealInsulineVariableSymbol()
|
---|
| 89 | : base(Name, string.Empty) {
|
---|
| 90 | minRowOffset = -48;
|
---|
| 91 | maxRowOffset = -1;
|
---|
| 92 | }
|
---|
| 93 |
|
---|
| 94 | public override ISymbolicExpressionTreeNode CreateTreeNode() {
|
---|
| 95 | return new RealInsulineVariableTreeNode(this);
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
| 99 | return new RealInsulineVariableSymbol(this, cloner);
|
---|
| 100 | }
|
---|
| 101 | }
|
---|
| 102 | }
|
---|