- Timestamp:
- 01/28/14 19:18:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs
r10378 r10414 32 32 private const string NodeImpactThresholdParameterName = "ImpactThreshold"; 33 33 34 private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition"; 35 34 36 private bool reentry; 35 37 [Storable] … … 52 54 get { return (ILookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; } 53 55 } 56 public ILookupParameter<IntRange> FitnessCalculationPartitionParameter { 57 get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; } 58 } 54 59 private ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> InterpreterParameter { 55 60 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[InterpreterParameterName]; } … … 76 81 #region properties 77 82 protected IDataAnalysisProblemData ProblemData { get { return ProblemDataParameter.ActualValue; } } 83 protected IntRange FitnessCalculationPartition { get { return FitnessCalculationPartitionParameter.ActualValue; } } 78 84 protected ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get { return InterpreterParameter.ActualValue; } } 79 85 protected IntValue UpdateInterval { get { return UpdateIntervalParameter.Value; } } … … 89 95 #endregion 90 96 97 #region IStatefulItem members 98 public override void InitializeState() { 99 base.InitializeState(); 100 UpdateCounter.Value = 0; 101 } 102 public override void ClearState() { 103 base.ClearState(); 104 UpdateCounter.Value = 0; 105 } 106 #endregion 107 91 108 [StorableConstructor] 92 109 protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(bool deserializing) : base(deserializing) { } 110 [StorableHook(HookType.AfterDeserialization)] 111 private void AfterDeserialization() { 112 if (!Parameters.ContainsKey(FitnessCalculationPartitionParameterName)) 113 Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, "")); 114 } 93 115 protected SymbolicDataAnalysisSingleObjectivePruningAnalyzer(SymbolicDataAnalysisSingleObjectivePruningAnalyzer original, Cloner cloner) 94 116 : base(original, cloner) { … … 110 132 Parameters.Add(new FixedValueParameter<DoubleValue>(NodeImpactThresholdParameterName, new DoubleValue(0.0))); 111 133 Parameters.Add(new FixedValueParameter<BoolValue>(PruneOnlyZeroImpactNodesParameterName, new BoolValue(false))); 134 Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, "")); 112 135 } 113 136 … … 147 170 Random = Random, 148 171 PruneOnlyZeroImpactNodes = PruneOnlyZeroImpactNodes.Value, 149 NodeImpactThreshold = NodeImpactThreshold.Value 172 NodeImpactThreshold = NodeImpactThreshold.Value, 173 FitnessCalculationPartition = FitnessCalculationPartition 150 174 }; 151 175 operations.Add(ExecutionContext.CreateChildOperation(op, ExecutionContext.Scope));
Note: See TracChangeset
for help on using the changeset viewer.