Free cookie consent management tool by TermsFeed Policy Generator

source: branches/sluengo/HeuristicLab.Problems.TradeRules/Symbols/ConstantInt.cs @ 9283

Last change on this file since 9283 was 9262, checked in by sluengo, 12 years ago
File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Common;
6using HeuristicLab.Core;
7using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
8using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
9
10namespace HeuristicLab.Problems.TradeRules
11{
12    [StorableClass]
13    [Item("ConstantInt", "Represents a ConstantInt value.")]
14    public sealed class ConstantInt : Symbol
15    {
16        private const int minimumArity = 0;
17        private const int maximumArity = 0;
18
19        public override int MinimumArity
20        {
21            get { return minimumArity; }
22        }
23        public override int MaximumArity
24        {
25            get { return maximumArity; }
26        }
27
28
29        [StorableConstructor]
30        private ConstantInt(bool deserializing) : base(deserializing) { }
31        private ConstantInt(ConstantInt original, Cloner cloner)
32            : base(original, cloner)
33        {
34        }
35        public ConstantInt()
36            : base("ConstantInt", "Represents a ConstantInt value.")
37        {
38        }
39
40        public override ISymbolicExpressionTreeNode CreateTreeNode()
41        {
42            return new ConstantIntTreeNode(this);
43        }
44
45        public override IDeepCloneable Clone(Cloner cloner)
46        {
47            return new ConstantInt(this, cloner);
48        }
49    }
50}
Note: See TracBrowser for help on using the repository browser.