Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/29/09 18:28:45 (15 years ago)
Author:
gkronber
Message:

GP Refactoring #713

  • introduced a plugin for GP interfaces
  • created a new interface IGeneticProgrammingModel which represents GP models in HL scopes instead of IFunctionTree
  • changed interfaces IFunction and IFunctionTree
  • moved some files to new directories (general housekeeping)
  • changed all GP operators and engines to work with IGeneticProgrammingModels
  • removed parameters TreeSize and TreeHeight in all GP operators
  • changed parameter OperatorLibrary to FunctionLibrary in all GP operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Constant.cs

    r2202 r2210  
    3030using HeuristicLab.Operators;
    3131using HeuristicLab.Random;
     32using HeuristicLab.GP.Interfaces;
    3233
    3334namespace HeuristicLab.GP.StructureIdentification {
    3435  public sealed class Constant : Terminal {
    3536    public const string VALUE = "Value";
    36     private BakedFunctionTree constantNodeTemplate;
    3737
    3838    public override string Description {
     
    4848    public Constant()
    4949      : base() {
    50       DoubleData valueData = new DoubleData();
    51       constantNodeTemplate = new BakedFunctionTree(this);
    52       constantNodeTemplate.AddVariable(new HeuristicLab.Core.Variable(VALUE, valueData));
    53 
    5450      SetupInitialization();
    5551      SetupManipulation();
     
    5753
    5854    public override IFunctionTree GetTreeNode() {
    59       return (IFunctionTree)constantNodeTemplate.Clone();
     55      return new ConstantFunctionTree(this);
    6056    }
    6157
Note: See TracChangeset for help on using the changeset viewer.