Changeset 13395
- Timestamp:
- 11/25/15 13:59:23 (9 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 21 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/EvaluationTracker.cs
r12057 r13395 27 27 using HeuristicLab.Encodings.BinaryVectorEncoding; 28 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;30 29 using HeuristicLab.Problems.Binary; 31 30 … … 61 60 #endregion 62 61 63 [StorableConstructor]64 private EvaluationTracker(bool deserializing) : base(deserializing) { }65 62 private EvaluationTracker(EvaluationTracker original, Cloner cloner) 66 63 : base(original, cloner) { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Grammars/SimpleSymbolicExpressionGrammar.cs
r12422 r13395 25 25 26 26 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 27 [StorableClass] 27 28 public sealed class SimpleSymbolicExpressionGrammar : SymbolicExpressionGrammar { 28 29 [StorableConstructor] -
trunk/sources/HeuristicLab.Optimization.Operators/3.3/MultiObjective/RankAndCrowdingSorter.cs
r12144 r13395 29 29 30 30 namespace HeuristicLab.Optimization.Operators { 31 [StorableClass] 31 32 public class RankAndCrowdingSorter : AlgorithmOperator, IMultiObjectiveOperator { 32 33 #region Parameter properties -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveEvaluator.cs
r12012 r13395 24 24 25 25 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 26 [StorableClass] 26 27 public abstract class SymbolicClassificationMultiObjectiveEvaluator : SymbolicDataAnalysisMultiObjectiveEvaluator<IClassificationProblemData>, ISymbolicClassificationMultiObjectiveEvaluator { 27 28 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSolutionsAnalyzer.cs
r12012 r13395 33 33 34 34 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 35 [StorableClass] 35 36 public class SymbolicRegressionSolutionsAnalyzer : SingleSuccessorOperator, IAnalyzer { 36 37 private const string ResultCollectionParameterName = "Results"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs
r12108 r13395 35 35 36 36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Creators { 37 [StorableClass] 37 38 public class MultiSymbolicDataAnalysisExpressionCreator : StochasticMultiBranch<ISymbolicDataAnalysisSolutionCreator>, 38 39 ISymbolicDataAnalysisSolutionCreator, -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionContextAwareCrossover.cs
r12422 r13395 34 34 "- Randomly choose a node N from P1\n" + 35 35 "- Test all crossover points from P0 to determine the best location for N to be inserted")] 36 [StorableClass] 36 37 public sealed class SymbolicDataAnalysisExpressionContextAwareCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { 37 38 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionCrossover.cs
r12012 r13395 32 32 33 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 34 [StorableClass] 34 35 public abstract class SymbolicDataAnalysisExpressionCrossover<T> : SymbolicExpressionTreeCrossover, ISymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { 35 36 private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDepthConstrainedCrossover.cs
r12422 r13395 36 36 "- Standard (mid 50% of the tree)\n" + 37 37 "- LowLevel (lower 25% of the tree)")] 38 [StorableClass] 38 39 public sealed class SymbolicDataAnalysisExpressionDepthConstrainedCrossover<T> : 39 40 SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDeterministicBestCrossover.cs
r12422 r13395 34 34 "- Randomly choose a crossover point C from P0\n" + 35 35 "- Test all nodes from P1 to determine the one that produces the best child when inserted at place C in P0")] 36 [StorableClass] 36 37 public sealed class SymbolicDataAnalysisExpressionDeterministicBestCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { 37 38 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs
r12422 r13395 36 36 "\t\tD(N,M) = 0.5 * ( abs(max(N) - max(M)) + abs(min(N) - min(M)) )\n" + 37 37 "- Make a probabilistic weighted choice of node M from P1, based on the inversed and normalized behavioral distance")] 38 [StorableClass] 38 39 public sealed class SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { 39 40 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs
r12422 r13395 37 37 "- Find the first node M that satisfies the semantic similarity criteria\n" + 38 38 "- Swap N for M and return P0")] 39 [StorableClass] 39 40 public sealed class SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<T> : SymbolicDataAnalysisExpressionCrossover<T> where T : class, IDataAnalysisProblemData { 40 41 private const string SemanticSimilarityRangeParameterName = "SemanticSimilarityRange"; -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Evaluators/SymbolicDataAnalysisMultiObjectiveEvaluator.cs
r12012 r13395 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 31 [StorableClass] 31 32 public abstract class SymbolicDataAnalysisMultiObjectiveEvaluator<T> : SymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisMultiObjectiveEvaluator<T> 32 33 where T : class, IDataAnalysisProblemData { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Symbolic/SingleObjective/Evaluator.cs
r12012 r13395 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis.Trading.Symbolic { 28 [StorableClass] 28 29 public abstract class SingleObjectiveEvaluator : SymbolicDataAnalysisSingleObjectiveEvaluator<IProblemData>, ISingleObjectiveEvaluator { 29 30 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs
r12612 r13395 31 31 32 32 [Item("Transformation", "Represents the base class for a transformation.")] 33 [StorableClass] 33 34 public abstract class Transformation : ParameterizedNamedItem, ITransformation { 34 35 protected const string ColumnParameterName = "Column"; -
trunk/sources/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/GenotypeToPhenotypeMapper.cs
r12422 r13395 37 37 /// Abstract base class for GenotypeToPhenotypeMappers 38 38 /// </summary> 39 [StorableClass] 39 40 public abstract class GenotypeToPhenotypeMapper : IntegerVectorOperator, IGenotypeToPhenotypeMapper { 40 41 -
trunk/sources/HeuristicLab.Problems.GrammaticalEvolution/3.4/Mappers/GenotypeToPhenotypeMapper.cs
r12915 r13395 37 37 /// Abstract base class for GenotypeToPhenotypeMappers 38 38 /// </summary> 39 [StorableClass] 39 40 public abstract class GenotypeToPhenotypeMapper : IntegerVectorOperator, IGenotypeToPhenotypeMapper { 40 41 -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/FeatureSelection/FeatureSelectionRegressionProblemData.cs
r12509 r13395 30 30 31 31 namespace HeuristicLab.Problems.Instances.DataAnalysis { 32 [StorableClass] 32 33 public class FeatureSelectionRegressionProblemData : RegressionProblemData { 33 34 private const string SelectedFeaturesParameterName = "SelectedFeatures"; -
trunk/sources/HeuristicLab.Problems.Orienteering/3.3/Analyzers/BestOrienteeringSolutionAnalyzer.cs
r12721 r13395 31 31 32 32 namespace HeuristicLab.Problems.Orienteering { 33 [StorableClass] 33 34 public sealed class BestOrienteeringSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer { 34 35 public bool EnabledByDefault { -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/RealVectorToRealVectorEncoder.cs
r12012 r13395 30 30 #region Backwards compatible code (remove with 3.4) 31 31 [Obsolete("This operator should not be used anymore.")] 32 [StorableClass] 32 33 internal class RealVectorToRealVectorEncoder : SingleSuccessorOperator { 33 34 -
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/StorableTest.cs
r13391 r13395 21 21 22 22 using System; 23 using System.Collections;24 23 using System.Collections.Generic; 25 24 using System.Linq; 26 25 using System.Reflection; 27 26 using System.Text; 27 using HeuristicLab.Common; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.PluginInfrastructure; … … 32 32 namespace HeuristicLab.Tests { 33 33 [TestClass] 34 public class Storable ConstructorTest {34 public class StorableTest { 35 35 [TestMethod] 36 36 [TestCategory("General")] … … 51 51 else { 52 52 if (storableType.IsSealed && !storableConstructor.IsPrivate) 53 errorMessage.Append(Environment.NewLine + storableType. ToString() + ": Storable constructor must be private in sealed classes.");53 errorMessage.Append(Environment.NewLine + storableType.Namespace + "." + storableType.GetPrettyName() + ": Storable constructor must be private in sealed classes."); 54 54 else if (!storableType.IsSealed && !(storableConstructor.IsFamily || storableConstructor.IsPublic)) 55 errorMessage.Append(Environment.NewLine + storableType.ToString() + ": Storable constructor must be protected (can be public in rare cases)."); 55 errorMessage.Append(Environment.NewLine + storableType.Namespace + "." + storableType.GetPrettyName() + ": Storable constructor must be protected (can be public in rare cases)."); 56 } 57 } 58 Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString()); 59 } 60 61 [TestMethod] 62 [TestCategory("General")] 63 [TestCategory("Essential")] 64 [TestProperty("Time", "short")] 65 public void TestStorableClass() { 66 var errorMessage = new StringBuilder(); 67 68 foreach (var type in ApplicationManager.Manager.GetTypes(typeof(object), onlyInstantiable: false, includeGenericTypeDefinitions: true) 69 .Where(t => t.Namespace != null && !t.Namespace.Contains(".Tests")) 70 .Where(t => !StorableClassAttribute.IsStorableClass(t))) { 71 var members = type.GetMembers(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly); 72 var storableConstructor = members.SingleOrDefault(m => Attribute.IsDefined(m, typeof(StorableConstructorAttribute), inherit: false)); 73 var storableMembers = members.Where(m => Attribute.IsDefined(m, typeof(StorableAttribute), inherit: false)); 74 75 if (storableConstructor != null) { 76 errorMessage.Append(Environment.NewLine + type.Namespace + "." + type.GetPrettyName() + ": Contains a storable constructor but is not a storable class."); 77 } else if (storableMembers.Any()) { 78 errorMessage.Append(Environment.NewLine + type.Namespace + "." + type.GetPrettyName() + ": Contains at least one storable member but is not a storable class."); 56 79 } 57 80 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r13393 r13395 465 465 <Compile Include="HeuristicLab-3.3\Samples\TabuSearchVRPSampleTest.cs" /> 466 466 <Compile Include="HeuristicLab-3.3\Samples\VnsTspSampleTest.cs" /> 467 <Compile Include="HeuristicLab-3.3\StorableClassTest.cs" /> 468 <Compile Include="HeuristicLab-3.3\StorableConstructorTest.cs" /> 467 <Compile Include="HeuristicLab-3.3\StorableTest.cs" /> 469 468 <Compile Include="HeuristicLab-3.3\ThreadSafeLogTest.cs" /> 470 469 <Compile Include="HeuristicLab-3.3\ToStringTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.