Changeset 4118 for trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3
- Timestamp:
- 07/27/10 19:54:20 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SingleObjectiveSymbolicTimeSeriesPrognosisProblem.cs
r4113 r4118 85 85 #endregion 86 86 87 87 [StorableConstructor] 88 protected SingleObjectiveSymbolicTimeSeriesPrognosisProblem(bool deserializing) : base(deserializing) { } 88 89 public SingleObjectiveSymbolicTimeSeriesPrognosisProblem() 89 90 : base() { … … 96 97 ParameterizeEvaluator(); 97 98 98 Initialize(); 99 InitializeOperators(); 100 AttachEventHandlers(); 99 101 } 100 101 [StorableConstructor]102 protected SingleObjectiveSymbolicTimeSeriesPrognosisProblem(bool deserializing) : base(deserializing) { }103 102 104 103 [StorableHook(HookType.AfterDeserialization)] 105 104 private void AfterDeserializationHook() { 106 Initialize();105 AttachEventHandlers(); 107 106 } 108 107 109 108 public override IDeepCloneable Clone(Cloner cloner) { 110 109 SingleObjectiveSymbolicTimeSeriesPrognosisProblem clone = (SingleObjectiveSymbolicTimeSeriesPrognosisProblem)base.Clone(cloner); 111 clone. Initialize();110 clone.AttachEventHandlers(); 112 111 return clone; 113 112 } … … 135 134 136 135 #region Helpers 137 private void Initialize() { 138 InitializeOperators(); 136 private void AttachEventHandlers() { 139 137 } 140 138 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SymbolicTimeSeriesPrognosisProblem.cs
r4113 r4118 122 122 set { FunctionTreeGrammarParameter.Value = value; } 123 123 } 124 private List<IOperator> operators;125 124 public override IEnumerable<IOperator> Operators { 126 125 get { return operators; } … … 157 156 [Storable] 158 157 private SymbolicTimeSeriesPrognosisGrammar grammar; 159 158 [Storable] 159 private List<IOperator> operators; 160 161 [StorableConstructor] 162 protected SymbolicTimeSeriesPrognosisProblem(bool deserializing) : base(deserializing) { } 160 163 public SymbolicTimeSeriesPrognosisProblem() 161 164 : base() { … … 179 182 180 183 UpdateGrammar(); 181 Initialize(); 182 } 183 184 [StorableConstructor] 185 protected SymbolicTimeSeriesPrognosisProblem(bool deserializing) : base(deserializing) { } 184 InitializeOperators(); 185 RegisterParameterEvents(); 186 RegisterParameterValueEvents(); 187 } 186 188 187 189 [StorableHook(HookType.AfterDeserialization)] 188 190 private void AfterDeserializationHook() { 189 Initialize(); 191 // BackwardsCompatibility3.3 192 #region Backwards compatible code (remove with 3.4) 193 if (operators == null) InitializeOperators(); 194 #endregion 195 RegisterParameterEvents(); 196 RegisterParameterValueEvents(); 190 197 } 191 198 192 199 public override IDeepCloneable Clone(Cloner cloner) { 193 200 SymbolicTimeSeriesPrognosisProblem clone = (SymbolicTimeSeriesPrognosisProblem)base.Clone(cloner); 201 clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList(); 194 202 clone.grammar = (SymbolicTimeSeriesPrognosisGrammar)cloner.Clone(grammar); 195 clone.Initialize(); 203 clone.RegisterParameterEvents(); 204 clone.RegisterParameterValueEvents(); 196 205 return clone; 197 206 } … … 253 262 protected void AddOperator(IOperator op) { 254 263 operators.Add(op); 255 }256 257 private void Initialize() {258 InitializeOperators();259 RegisterParameterEvents();260 RegisterParameterValueEvents();261 264 } 262 265
Note: See TracChangeset
for help on using the changeset viewer.