Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16753


Ignore:
Timestamp:
04/03/19 16:33:04 (6 years ago)
Author:
mkommend
Message:

#2521: Made basic problem specific operators internal and sealed.

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCreator.cs

    r16723 r16753  
    2929  [Item("MultiEncodingCreator", "Contains solution creators that together create a multi-encoding.")]
    3030  [StorableType("E261B506-6F74-4BC4-8164-5ACE20FBC319")]
    31   public sealed class MultiEncodingCreator : MultiEncodingOperator<ISolutionCreator>, ISolutionCreator<CombinedSolution> {
     31  internal sealed class MultiEncodingCreator : MultiEncodingOperator<ISolutionCreator>, ISolutionCreator<CombinedSolution> {
    3232
    3333    [StorableConstructor]
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCrossover.cs

    r16723 r16753  
    2727  [Item("MultiEncoding Crossover", "Applies different crossovers to cross a multi-encoding.")]
    2828  [StorableType("BB0A04E2-899D-460C-82A2-5E4CEEDE8996")]
    29   public sealed class MultiEncodingCrossover : MultiEncodingOperator<ICrossover>, ICrossover {
     29  internal sealed class MultiEncodingCrossover : MultiEncodingOperator<ICrossover>, ICrossover {
    3030
    3131    [StorableConstructor]
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingManipulator.cs

    r16723 r16753  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    24 using HEAL.Attic;
    2525
    2626namespace HeuristicLab.Optimization {
    2727  [Item("MultiEncoding Manipulator", "Applies different manipulators to change a multi-encoding.")]
    2828  [StorableType("574D0530-47E8-4FD9-8AC8-B8EA2DE3C203")]
    29   public sealed class MultiEncodingManipulator : MultiEncodingOperator<IManipulator>, IManipulator {
     29  internal sealed class MultiEncodingManipulator : MultiEncodingOperator<IManipulator>, IManipulator {
    3030    [StorableConstructor]
    3131    private MultiEncodingManipulator(StorableConstructorFlag _) : base(_) { }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingOperator.cs

    r16724 r16753  
    3030namespace HeuristicLab.Optimization {
    3131  [StorableType("43619638-9D00-4951-8138-8CCD0786E784")]
    32   public abstract class MultiEncodingOperator<T> : InstrumentedOperator, IEncodingOperator<CombinedSolution>, IMultiEncodingOperator where T : class, IOperator {
     32  internal abstract class MultiEncodingOperator<T> : InstrumentedOperator, IEncodingOperator<CombinedSolution>, IMultiEncodingOperator where T : class, IOperator {
    3333    public ILookupParameter<CombinedSolution> SolutionParameter {
    3434      get { return (ILookupParameter<CombinedSolution>)Parameters["Solution"]; }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveAnalyzer.cs

    r16751 r16753  
    3333  [Item("Multi-objective Analyzer", "Calls the Analyze method of the problem definition.")]
    3434  [StorableType("903FE3D1-3179-4EA5-A7E1-63DE26239F9B")]
    35   public class MultiObjectiveAnalyzer<TEncodedSolution> : SingleSuccessorOperator, IMultiObjectiveAnalysisOperator<TEncodedSolution>, IStochasticOperator
     35  internal sealed class MultiObjectiveAnalyzer<TEncodedSolution> : SingleSuccessorOperator, IMultiObjectiveAnalysisOperator<TEncodedSolution>, IStochasticOperator
    3636  where TEncodedSolution : class, IEncodedSolution {
    3737    public bool EnabledByDefault { get { return true; } }
     
    5656
    5757    [StorableConstructor]
    58     protected MultiObjectiveAnalyzer(StorableConstructorFlag _) : base(_) { }
    59     protected MultiObjectiveAnalyzer(MultiObjectiveAnalyzer<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
     58    private MultiObjectiveAnalyzer(StorableConstructorFlag _) : base(_) { }
     59    private MultiObjectiveAnalyzer(MultiObjectiveAnalyzer<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
    6060    public MultiObjectiveAnalyzer() {
    6161      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiObjectiveEvaluator.cs

    r16751 r16753  
    3131  [Item("Multi-objective Evaluator", "Calls the Evaluate method of the problem definition and writes the return value into the scope.")]
    3232  [StorableType("C5605ED8-0ED2-4C7B-97A1-E7EB68A4FDBF")]
    33   public class MultiObjectiveEvaluator<TEncodedSolution> : InstrumentedOperator, IMultiObjectiveEvaluationOperator<TEncodedSolution>, IStochasticOperator
     33  public sealed class MultiObjectiveEvaluator<TEncodedSolution> : InstrumentedOperator, IMultiObjectiveEvaluationOperator<TEncodedSolution>, IStochasticOperator
    3434  where TEncodedSolution : class, IEncodedSolution {
    3535
     
    4949
    5050    [StorableConstructor]
    51     protected MultiObjectiveEvaluator(StorableConstructorFlag _) : base(_) { }
    52     protected MultiObjectiveEvaluator(MultiObjectiveEvaluator<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
     51    private MultiObjectiveEvaluator(StorableConstructorFlag _) : base(_) { }
     52    private MultiObjectiveEvaluator(MultiObjectiveEvaluator<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
    5353    public MultiObjectiveEvaluator() {
    5454      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveAnalyzer.cs

    r16751 r16753  
    3333  [Item("Single-objective Analyzer", "Calls the script's Analyze method to be able to write into the results collection.")]
    3434  [StorableType("3D20F8E2-CE11-4021-A05B-CFCB02C0FD6F")]
    35   public sealed class SingleObjectiveAnalyzer<TEncodedSolution> : SingleSuccessorOperator, ISingleObjectiveAnalysisOperator<TEncodedSolution>, IAnalyzer, IStochasticOperator
     35  internal sealed class SingleObjectiveAnalyzer<TEncodedSolution> : SingleSuccessorOperator, ISingleObjectiveAnalysisOperator<TEncodedSolution>, IAnalyzer, IStochasticOperator
    3636  where TEncodedSolution : class, IEncodedSolution {
    3737    public bool EnabledByDefault { get { return true; } }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveEvaluator.cs

    r16751 r16753  
    2121
    2222using System;
     23using HEAL.Attic;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
     
    2627using HeuristicLab.Operators;
    2728using HeuristicLab.Parameters;
    28 using HEAL.Attic;
    2929
    3030namespace HeuristicLab.Optimization {
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveImprover.cs

    r16751 r16753  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    2829using HeuristicLab.Operators;
    2930using HeuristicLab.Parameters;
    30 using HEAL.Attic;
    3131
    3232namespace HeuristicLab.Optimization {
    3333  [Item("Single-objective Improver", "Improves a solution by calling GetNeighbors and Evaluate of the corresponding problem definition.")]
    3434  [StorableType("7A917E09-920C-4B47-9599-67371101B35F")]
    35   public sealed class SingleObjectiveImprover<TEncodedSolution> : SingleSuccessorOperator, INeighborBasedOperator<TEncodedSolution>, IImprovementOperator, ISingleObjectiveEvaluationOperator<TEncodedSolution>, IStochasticOperator
     35  internal sealed class SingleObjectiveImprover<TEncodedSolution> : SingleSuccessorOperator, INeighborBasedOperator<TEncodedSolution>, IImprovementOperator, ISingleObjectiveEvaluationOperator<TEncodedSolution>, IStochasticOperator
    3636    where TEncodedSolution : class, IEncodedSolution {
    3737    public ILookupParameter<IRandom> RandomParameter {
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveEvaluator.cs

    r16751 r16753  
    3131  [Item("Single-objective MoveEvaluator", "Evaluates a parameter vector that results from a move.")]
    3232  [StorableType("EE4B1EBA-50BF-40C7-B338-F4A9D9CC554E")]
    33   public class SingleObjectiveMoveEvaluator<TEncodedSolution> : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator<TEncodedSolution>, ISingleObjectiveMoveEvaluator, IStochasticOperator, ISingleObjectiveMoveOperator
     33  internal sealed class SingleObjectiveMoveEvaluator<TEncodedSolution> : SingleSuccessorOperator, ISingleObjectiveEvaluationOperator<TEncodedSolution>, ISingleObjectiveMoveEvaluator, IStochasticOperator, ISingleObjectiveMoveOperator
    3434  where TEncodedSolution : class, IEncodedSolution {
    3535
     
    5353
    5454    [StorableConstructor]
    55     protected SingleObjectiveMoveEvaluator(StorableConstructorFlag _) : base(_) { }
    56     protected SingleObjectiveMoveEvaluator(SingleObjectiveMoveEvaluator<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
     55    private SingleObjectiveMoveEvaluator(StorableConstructorFlag _) : base(_) { }
     56    private SingleObjectiveMoveEvaluator(SingleObjectiveMoveEvaluator<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
    5757    public SingleObjectiveMoveEvaluator() {
    5858      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveGenerator.cs

    r16751 r16753  
    2424using System.Globalization;
    2525using System.Linq;
     26using HEAL.Attic;
    2627using HeuristicLab.Common;
    2728using HeuristicLab.Core;
     
    2930using HeuristicLab.Operators;
    3031using HeuristicLab.Parameters;
    31 using HEAL.Attic;
    3232
    3333namespace HeuristicLab.Optimization {
    3434  [Item("Single-objective MoveGenerator", "Calls the GetNeighbors method of the problem definition to obtain the moves.")]
    3535  [StorableType("CB37E7D8-EAC3-4061-9D39-20538CD1064D")]
    36   public class SingleObjectiveMoveGenerator<TEncodedSolution> : SingleSuccessorOperator, INeighborBasedOperator<TEncodedSolution>, IMultiMoveGenerator, IStochasticOperator, ISingleObjectiveMoveOperator
     36  internal sealed class SingleObjectiveMoveGenerator<TEncodedSolution> : SingleSuccessorOperator, INeighborBasedOperator<TEncodedSolution>, IMultiMoveGenerator, IStochasticOperator, ISingleObjectiveMoveOperator
    3737  where TEncodedSolution : class, IEncodedSolution {
    3838    public ILookupParameter<IRandom> RandomParameter {
     
    5151
    5252    [StorableConstructor]
    53     protected SingleObjectiveMoveGenerator(StorableConstructorFlag _) : base(_) { }
    54     protected SingleObjectiveMoveGenerator(SingleObjectiveMoveGenerator<TEncodedSolution> original, Cloner cloner)
     53    private SingleObjectiveMoveGenerator(StorableConstructorFlag _) : base(_) { }
     54    private SingleObjectiveMoveGenerator(SingleObjectiveMoveGenerator<TEncodedSolution> original, Cloner cloner)
    5555      : base(original, cloner) { }
    5656    public SingleObjectiveMoveGenerator() {
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Operators/SingleObjectiveMoveMaker.cs

    r16751 r16753  
    3131  [Item("Single-objective MoveMaker", "Applies a move.")]
    3232  [StorableType("C0ABF392-C825-4B98-8FB9-5749A9091FD6")]
    33   public class SingleObjectiveMoveMaker<TEncodedSolution> : InstrumentedOperator, IMoveMaker, ISingleObjectiveMoveOperator
     33  internal sealed class SingleObjectiveMoveMaker<TEncodedSolution> : InstrumentedOperator, IMoveMaker, ISingleObjectiveMoveOperator
    3434  where TEncodedSolution : class, IEncodedSolution {
    3535    public ILookupParameter<IEncoding<TEncodedSolution>> EncodingParameter {
     
    4646
    4747    [StorableConstructor]
    48     protected SingleObjectiveMoveMaker(StorableConstructorFlag _) : base(_) { }
    49     protected SingleObjectiveMoveMaker(SingleObjectiveMoveMaker<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
     48    private SingleObjectiveMoveMaker(StorableConstructorFlag _) : base(_) { }
     49    private SingleObjectiveMoveMaker(SingleObjectiveMoveMaker<TEncodedSolution> original, Cloner cloner) : base(original, cloner) { }
    5050    public SingleObjectiveMoveMaker() {
    5151      Parameters.Add(new LookupParameter<IEncoding<TEncodedSolution>>("Encoding", "An item that holds the problem's encoding."));
Note: See TracChangeset for help on using the changeset viewer.