Changeset 2210 for branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs
- Timestamp:
- 07/29/09 18:28:45 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs
r2202 r2210 30 30 using HeuristicLab.Operators; 31 31 using HeuristicLab.Random; 32 using HeuristicLab.GP.Interfaces; 32 33 33 34 namespace HeuristicLab.GP.StructureIdentification { 34 35 public sealed class Constant : Terminal { 35 36 public const string VALUE = "Value"; 36 private BakedFunctionTree constantNodeTemplate;37 37 38 38 public override string Description { … … 48 48 public Constant() 49 49 : base() { 50 DoubleData valueData = new DoubleData();51 constantNodeTemplate = new BakedFunctionTree(this);52 constantNodeTemplate.AddVariable(new HeuristicLab.Core.Variable(VALUE, valueData));53 54 50 SetupInitialization(); 55 51 SetupManipulation(); … … 57 53 58 54 public override IFunctionTree GetTreeNode() { 59 return (IFunctionTree)constantNodeTemplate.Clone();55 return new ConstantFunctionTree(this); 60 56 } 61 57
Note: See TracChangeset
for help on using the changeset viewer.