Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/05/12 11:58:17 (12 years ago)
Author:
mkommend
Message:

#1081: Merged trunk changes and fixed compilation errors due to the merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveAnalyzer.cs

    r7268 r8742  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    23 using System.Linq;
    2422using HeuristicLab.Common;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Data;
    27 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    28 using HeuristicLab.Operators;
    2925using HeuristicLab.Parameters;
    3026using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 using HeuristicLab.Optimization;
    3227
    3328namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    3934    private const string QualityParameterName = "Quality";
    4035    private const string MaximizationParameterName = "Maximization";
     36    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
     37
    4138    #region parameter properties
    4239    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
     
    4542    public ILookupParameter<BoolValue> MaximizationParameter {
    4643      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
     44    }
     45    public ILookupParameter<BoolValue> ApplyLinearScalingParameter {
     46      get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
    4747    }
    4848    #endregion
     
    6464      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The qualities of the trees that should be analyzed."));
    6565      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
     66      Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
     67    }
     68
     69    [StorableHook(HookType.AfterDeserialization)]
     70    private void AfterDeserialization() {
     71      if (Parameters.ContainsKey(ApplyLinearScalingParameterName) && !(Parameters[ApplyLinearScalingParameterName] is LookupParameter<BoolValue>))
     72        Parameters.Remove(ApplyLinearScalingParameterName);
     73      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName))
     74        Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
    6675    }
    6776  }
Note: See TracChangeset for help on using the changeset viewer.