Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/25/12 11:22:32 (12 years ago)
Author:
mkommend
Message:

#1976: Added code to clean up the state of the ConstantOptimizationAnalyzer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/ConstantOptimizationAnalyzer.cs

    r8845 r8849  
    3636  [Item("ConstantOptimizationAnalyzer", "An operator that performs a constant optimization on the best symbolic expression trees.")]
    3737  [StorableClass]
    38   public sealed class ConstantOptimizationAnalyzer : SymbolicDataAnalysisSingleObjectiveAnalyzer {
     38  public sealed class ConstantOptimizationAnalyzer : SymbolicDataAnalysisSingleObjectiveAnalyzer, IStatefulItem {
    3939    private const string PercentageOfBestSolutionsParameterName = "PercentageOfBestSolutions";
    4040    private const string ConstantOptimizationEvaluatorParameterName = "ConstantOptimizationOperator";
     
    9999    private double[] qualitiesBeforeCoOp = null;
    100100    private int[] scopeIndexes = null;
     101    void IStatefulItem.InitializeState() {
     102      qualitiesBeforeCoOp = null;
     103      scopeIndexes = null;
     104    }
     105    void IStatefulItem.ClearState() {
     106      qualitiesBeforeCoOp = null;
     107      scopeIndexes = null;
     108    }
     109
    101110    public override IOperation Apply() {
    102111      //code executed for first call of analyzer
Note: See TracChangeset for help on using the changeset viewer.