Changeset 6228 for branches/PersistenceSpeedUp
- Timestamp:
- 05/17/11 17:16:33 (14 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
r6182 r6228 51 51 Problem = new ClassificationProblem(); 52 52 } 53 [StorableHook(HookType.AfterDeserialization)]54 private void AfterDeserialization() { }55 53 56 54 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
r6182 r6228 52 52 Problem = new RegressionProblem(); 53 53 } 54 [StorableHook(HookType.AfterDeserialization)]55 private void AfterDeserialization() { }56 54 57 55 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs
r6182 r6228 102 102 Parameters.Add(new ValueParameter<DoubleValue>(GammaParameterName, "The value of the gamma parameter in the kernel function.", new DoubleValue(1.0))); 103 103 } 104 [StorableHook(HookType.AfterDeserialization)]105 private void AfterDeserialization() { }106 104 107 105 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs
r6182 r6228 110 110 Parameters.Add(new ValueParameter<DoubleValue>(EpsilonParameterName, "The value of the epsilon parameter for epsilon-SVR.", new DoubleValue(0.1))); 111 111 } 112 [StorableHook(HookType.AfterDeserialization)]113 private void AfterDeserialization() { }114 112 115 113 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs
r6182 r6228 69 69 Problem = new ClusteringProblem(); 70 70 } 71 [StorableHook(HookType.AfterDeserialization)]72 private void AfterDeserialization() { }73 71 74 72 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Algorithms.NSGA2/3.3/NSGA2.cs
r5809 r6228 306 306 #region Helpers 307 307 [StorableHook(HookType.AfterDeserialization)] 308 private void AfterDeserialization() { 309 AttachEventHandlers(); 310 } 311 308 312 private void AttachEventHandlers() { 309 313 PopulationSizeParameter.ValueChanged += new EventHandler(PopulationSizeParameter_ValueChanged); -
branches/PersistenceSpeedUp/HeuristicLab.Analysis/3.3/ValueAnalysis/MinAverageMaxValueAnalyzer.cs
r5445 r6228 147 147 148 148 [StorableHook(HookType.AfterDeserialization)] 149 private void AfterDeserialization() { 150 Initialize(); 151 } 152 149 153 private void Initialize() { 150 154 ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged); … … 193 197 else if (!CollectMaxValueInResults.Value && maxValueParameter != null) 194 198 resultsCollector.CollectedValues.Remove(maxValueParameter); 195 199 } 196 200 197 201 private void CollectMinValueInResultsParameter_ValueChanged(object sender, EventArgs e) { -
branches/PersistenceSpeedUp/HeuristicLab.Encodings.RealVectorEncoding/3.3/ParticleOperators/RealVectorSwarmUpdater.cs
r5911 r6228 217 217 218 218 [StorableHook(HookType.AfterDeserialization)] 219 private void AfterDeserialization() { 220 RegisterEvents(); 221 } 222 219 223 private void RegisterEvents() { 220 224 VelocityBoundsStartValueParameter.ValueChanged += new EventHandler(VelocityBoundsStartValueParameter_ValueChanged); … … 223 227 224 228 void VelocityBoundsStartValueParameter_Value_ValueChanged(object sender, EventArgs e) { 225 UpdateVelocityBoundsParamater(); 229 UpdateVelocityBoundsParamater(); 226 230 } 227 231 … … 245 249 VelocityBoundsStartValueParameter.Value.ValueChanged += new EventHandler(VelocityBoundsStartValueParameter_Value_ValueChanged); 246 250 } 247 UpdateVelocityBoundsParamater(); 251 UpdateVelocityBoundsParamater(); 248 252 } 249 253 -
branches/PersistenceSpeedUp/HeuristicLab.Optimization.Operators/3.3/MultiObjective/CrowdingDistanceAssignment.cs
r5445 r6228 57 57 58 58 [StorableHook(HookType.AfterDeserialization)] 59 private void AfterDeserialization() { 60 AttachEventHandlers(); 61 } 62 59 63 private void AttachEventHandlers() { 60 64 QualitiesParameter.DepthChanged += new EventHandler(QualitiesParameter_DepthChanged); -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableClassAnalyzer.cs
r6224 r6228 139 139 if (methodInfo.ReturnType != typeof(void) || methodInfo.GetParameters().Length > 0) 140 140 return; 141 var attribute = (StorableHookAttribute)methodInfo.GetCustomAttributes(typeof(StorableHookAttribute), false).SingleOrDefault(); 142 if (attribute != null) 143 typeDescriptor.Hooks.Add(new HookDescriptor(typeDescriptor, methodInfo, attribute.HookType)); 141 switch (methodInfo.Name) { 142 case "AfterDeserialization": 143 typeDescriptor.Hooks.Add(new HookDescriptor(typeDescriptor, methodInfo, HookType.AfterDeserialization)); 144 break; 145 case "BeforeSerialization": 146 typeDescriptor.Hooks.Add(new HookDescriptor(typeDescriptor, methodInfo, HookType.BeforeSerialization)); 147 break; 148 default: break; 149 } 144 150 } 145 151 } -
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Tests/UseCases.cs
r6224 r6228 798 798 public bool WasSerialized { get; private set; } 799 799 [StorableHook(HookType.BeforeSerialization)] 800 void PreSerializationHook() {800 void BeforeSerialization() { 801 801 WasSerialized = true; 802 802 } 803 803 [StorableHook(HookType.AfterDeserialization)] 804 void PostDeserializationHook() {804 void AfterDeserialization() { 805 805 sum = a + b; 806 806 } … … 896 896 public object link; 897 897 [StorableHook(HookType.AfterDeserialization)] 898 private void relink() {898 private void AfterDeserialization() { 899 899 link = a; 900 900 } … … 906 906 public object b; 907 907 [StorableHook(HookType.AfterDeserialization)] 908 private void relink() {908 private void AfterDeserialization() { 909 909 Assert.AreSame(a, link); 910 910 link = b; -
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionOverfittingAnalyzer.cs
r5863 r6228 90 90 Parameters.Add(new LookupParameter<BoolValue>(OverfittingParameterName, "Boolean indicator for overfitting.")); 91 91 Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection.")); 92 } 93 94 [StorableHook(HookType.AfterDeserialization)] 95 private void AfterDeserialization() { 96 } 92 } 97 93 98 94 public override IDeepCloneable Clone(Cloner cloner) { -
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionValidationAnalyzer.cs
r5445 r6228 134 134 Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower estimation limit that was set for the evaluation of the symbolic expression trees.")); 135 135 } 136 137 [StorableHook(HookType.AfterDeserialization)] 138 private void AfterDeserialization() { } 139 136 140 137 public override IOperation Apply() { 141 138 var trees = SymbolicExpressionTree.ToArray(); -
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
r5809 r6228 28 28 using HeuristicLab.Parameters; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.PluginInfrastructure; 30 31 using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers; 31 using HeuristicLab.PluginInfrastructure;32 32 33 33 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic { … … 138 138 #region Helpers 139 139 [StorableHook(HookType.AfterDeserialization)] 140 private void AfterDeserialization Hook() {140 private void AfterDeserialization() { 141 141 // BackwardsCompatibility3.3 142 142 #region Backwards compatible code (remove with 3.4) -
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs
r5809 r6228 265 265 #region Helpers 266 266 [StorableHook(HookType.AfterDeserialization)] 267 private void AfterDeserialization Hook() {267 private void AfterDeserialization() { 268 268 // BackwardsCompatibility3.3 269 269 #region Backwards compatible code (remove with 3.4) -
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r5809 r6228 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.IO; 25 using System.Linq;26 24 using HeuristicLab.Common; 27 25 using HeuristicLab.Core; 28 using HeuristicLab.Data;29 using HeuristicLab.Parameters;30 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 27 … … 76 72 [StorableConstructor] 77 73 private ClusteringProblemData(bool deserializing) : base(deserializing) { } 78 [StorableHook(HookType.AfterDeserialization)]79 private void AfterDeserialization() {80 }81 82 74 83 75 private ClusteringProblemData(ClusteringProblemData original, Cloner cloner) -
branches/PersistenceSpeedUp/HeuristicLab.Problems.ExternalEvaluation/3.3/ExternalEvaluationProblem.cs
r6189 r6228 127 127 [StorableConstructor] 128 128 private ExternalEvaluationProblem(bool deserializing) : base(deserializing) { } 129 [StorableHook(HookType.AfterDeserialization)]130 private void AfterDeserializationHook() {131 AttachEventHandlers();132 }133 129 134 130 private ExternalEvaluationProblem(ExternalEvaluationProblem original, Cloner cloner) … … 158 154 [StorableHook(HookType.AfterDeserialization)] 159 155 private void AfterDeserialization() { 156 AttachEventHandlers(); 160 157 // BackwardsCompatibility3.3 161 158 #region Backwards compatible code, remove with 3.4 -
branches/PersistenceSpeedUp/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs
r5445 r6228 95 95 public BestVRPSolutionAnalyzer() 96 96 : base() { 97 97 Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("VRPTours", "The VRP tours which should be evaluated.")); 98 98 Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities.")); 99 99 Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities.")); … … 121 121 122 122 [StorableHook(HookType.AfterDeserialization)] 123 private void AfterDeserialization Hook() {123 private void AfterDeserialization() { 124 124 #region Backwards Compatibility 125 125 if (!Parameters.ContainsKey("BestKnownQuality")) { -
branches/PersistenceSpeedUp/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs
r6042 r6228 436 436 #region Helpers 437 437 [StorableHook(HookType.AfterDeserialization)] 438 private void AfterDeserialization Hook() {438 private void AfterDeserialization() { 439 439 #region Backwards Compatibility 440 440 if (!Parameters.ContainsKey("BestKnownSolution")) {
Note: See TracChangeset
for help on using the changeset viewer.