- Timestamp:
- 07/25/10 01:04:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r4068 r4098 147 147 get { return BestKnownQualityParameter.Value; } 148 148 } 149 private List<IOperator> operators;150 149 public override IEnumerable<IOperator> Operators { 151 150 get { return operators; } … … 180 179 #endregion 181 180 181 [Storable] 182 private List<IOperator> operators; 183 184 [StorableConstructor] 185 private SymbolicRegressionProblem(bool deserializing) : base() { } 182 186 public SymbolicRegressionProblem() 183 187 : base() { … … 208 212 UpdateGrammar(); 209 213 UpdateEstimationLimits(); 210 Initialize(); 211 } 212 213 [StorableConstructor] 214 private SymbolicRegressionProblem(bool deserializing) : base() { } 215 216 [StorableHook(HookType.AfterDeserialization)] 217 private void AfterDeserializationHook() { 218 RegisterParameterEvents(); 219 RegisterParameterValueEvents(); 214 InitializeOperators(); 215 AttachEventHandlers(); 220 216 } 221 217 222 218 public override IDeepCloneable Clone(Cloner cloner) { 223 219 SymbolicRegressionProblem clone = (SymbolicRegressionProblem)base.Clone(cloner); 224 clone.Initialize(); 220 clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList(); 221 clone.AttachEventHandlers(); 225 222 return clone; 226 223 } … … 305 302 306 303 #region Helpers 307 private void Initialize() { 308 InitializeOperators(); 304 [StorableHook(HookType.AfterDeserialization)] 305 private void AttachEventHandlers() { 306 // Start BackwardsCompatibility3.3 (remove with 3.4) 307 if (operators == null) InitializeOperators(); 308 // End BackwardsCompatibility3.3 309 309 RegisterParameterEvents(); 310 310 RegisterParameterValueEvents();
Note: See TracChangeset
for help on using the changeset viewer.