Free cookie consent management tool by TermsFeed Policy Generator

source: branches/sluengo/HeuristicLab.Problems.TradeRules/Symbols/MACDTreeNode.cs @ 17842

Last change on this file since 17842 was 9325, 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.Encodings.SymbolicExpressionTreeEncoding;
6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
7using HeuristicLab.Common;
8using HeuristicLab.Core;
9
10namespace HeuristicLab.Problems.TradeRules.Symbols
11{
12    public sealed class  MACDTreeNode : SymbolicExpressionTreeNode
13    {
14
15        public new MACD Symbol
16        {
17            get { return (MACD)base.Symbol; }
18        }
19       
20        [Storable]
21        private double idMACD;
22        public double ID
23        {
24            get {return idMACD; }
25            set { idMACD = value; }
26        }
27
28    [StorableConstructor]
29    private MACDTreeNode(bool deserializing) : base(deserializing) { }
30
31    private MACDTreeNode(MACDTreeNode original, Cloner cloner)
32      : base(original, cloner) {
33          idMACD = original.idMACD;
34    }
35
36    public MACDTreeNode(MACD MACDSymbol) : base(MACDSymbol) { }
37
38    public override bool HasLocalParameters {
39      get {
40        return true;
41      }
42    }
43
44    public override void ResetLocalParameters(IRandom random)
45    {
46        base.ResetLocalParameters(random);
47
48        idMACD = random.NextDouble();
49    }
50
51    public override IDeepCloneable Clone(Cloner cloner) {
52      return new MACDTreeNode(this, cloner);
53    }
54
55    }
56}
Note: See TracBrowser for help on using the repository browser.