Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2537


Ignore:
Timestamp:
12/02/09 17:17:01 (15 years ago)
Author:
mkommend
Message:

added getter for ITreeEvaluator in HL.GP.StructId.Predictor (ticket #760)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs

    r2401 r2537  
    3232namespace HeuristicLab.GP.StructureIdentification {
    3333  public class Predictor : PredictorBase {
     34    public Predictor() : base() { } // for persistence
     35    public Predictor(ITreeEvaluator evaluator, IGeneticProgrammingModel tree, double lowerPredictionLimit, double upperPredictionLimit)
     36      : base(lowerPredictionLimit, upperPredictionLimit) {
     37      this.treeEvaluator = evaluator;
     38      this.functionTree = tree;
     39    }
     40
    3441    private ITreeEvaluator treeEvaluator;
     42    public ITreeEvaluator TreeEvaluator {
     43      get { return (ITreeEvaluator) this.treeEvaluator.Clone(); }
     44    }
    3545
    3646    private IGeneticProgrammingModel functionTree;
     
    3848      get { return functionTree; }
    3949      set { this.functionTree = value; }
    40     }
    41 
    42     public Predictor() : base() { } // for persistence
    43     public Predictor(ITreeEvaluator evaluator, IGeneticProgrammingModel tree, double lowerPredictionLimit, double upperPredictionLimit)
    44       : base(lowerPredictionLimit, upperPredictionLimit) {
    45       this.treeEvaluator = evaluator;
    46       this.functionTree = tree;
    4750    }
    4851
Note: See TracChangeset for help on using the changeset viewer.