Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/27/10 03:35:11 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on algorithms
Location:
trunk/sources/HeuristicLab.Selection/3.3
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/3.3/HeuristicLab.Selection-3.3.csproj

    r2817 r2882  
    119119      <Name>HeuristicLab.Operators-3.3</Name>
    120120    </ProjectReference>
     121    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
     122      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
     123      <Name>HeuristicLab.Optimization-3.3</Name>
     124    </ProjectReference>
    121125    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    122126      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
  • trunk/sources/HeuristicLab.Selection/3.3/HeuristicLabSelectionPlugin.cs.frame

    r2818 r2882  
    3232  [PluginDependency("HeuristicLab.Data", "3.3")]
    3333  [PluginDependency("HeuristicLab.Operators", "3.3")]
     34  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    3435  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    3536  [PluginDependency("HeuristicLab.Persistence", "3.3")]
  • trunk/sources/HeuristicLab.Selection/3.3/Reducer.cs

    r2834 r2882  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Operators;
     25using HeuristicLab.Optimization;
    2526using HeuristicLab.Parameters;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3233  [Item("Reducer", "A base class for reduction operators.")]
    3334  [EmptyStorableClass]
    34   public abstract class Reducer : SingleSuccessorOperator {
     35  public abstract class Reducer : SingleSuccessorOperator, IReducer {
    3536    protected ScopeParameter CurrentScopeParameter {
    3637      get { return (ScopeParameter)Parameters["CurrentScope"]; }
  • trunk/sources/HeuristicLab.Selection/3.3/Selector.cs

    r2834 r2882  
    2424using HeuristicLab.Data;
    2525using HeuristicLab.Operators;
     26using HeuristicLab.Optimization;
    2627using HeuristicLab.Parameters;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334  [Item("Selector", "A base class for selection operators.")]
    3435  [EmptyStorableClass]
    35   public abstract class Selector : SingleSuccessorOperator {
     36  public abstract class Selector : SingleSuccessorOperator, ISelector {
    3637    protected ValueParameter<BoolData> CopySelectedParameter {
    3738      get { return (ValueParameter<BoolData>)Parameters["CopySelected"]; }
    3839    }
    39     public ValueLookupParameter<IntData> NumberOfSelectedSubScopesParameter {
     40    public IValueLookupParameter<IntData> NumberOfSelectedSubScopesParameter {
    4041      get { return (ValueLookupParameter<IntData>)Parameters["NumberOfSelectedSubScopes"]; }
    4142    }
  • trunk/sources/HeuristicLab.Selection/3.3/StochasticSelector.cs

    r2818 r2882  
    2121
    2222using HeuristicLab.Core;
     23using HeuristicLab.Optimization;
    2324using HeuristicLab.Parameters;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3031  [Item("StochasticSelector", "A base class for stochastic selection operators.")]
    3132  [EmptyStorableClass]
    32   public abstract class StochasticSelector : Selector {
    33     public LookupParameter<IRandom> RandomParameter {
     33  public abstract class StochasticSelector : Selector, IStochasticOperator {
     34    public ILookupParameter<IRandom> RandomParameter {
    3435      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3536    }
  • trunk/sources/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs

    r2818 r2882  
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Data;
     24using HeuristicLab.Optimization;
    2425using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3132  [Item("StochasticSingleObjectiveSelector", "A base class for stochastic selection operators which consider a single double quality value for selection.")]
    3233  [EmptyStorableClass]
    33   public abstract class StochasticSingleObjectiveSelector : StochasticSelector {
    34     public LookupParameter<BoolData> MaximizationParameter {
    35       get { return (LookupParameter<BoolData>)Parameters["Maximization"]; }
     34  public abstract class StochasticSingleObjectiveSelector : StochasticSelector, ISingleObjectiveSelector {
     35    public IValueLookupParameter<BoolData> MaximizationParameter {
     36      get { return (IValueLookupParameter<BoolData>)Parameters["Maximization"]; }
    3637    }
    37     public SubScopesLookupParameter<DoubleData> QualityParameter {
    38       get { return (SubScopesLookupParameter<DoubleData>)Parameters["Quality"]; }
     38    public ILookupParameter<ItemArray<DoubleData>> QualityParameter {
     39      get { return (ILookupParameter<ItemArray<DoubleData>>)Parameters["Quality"]; }
    3940    }
    4041
    4142    protected StochasticSingleObjectiveSelector()
    4243      : base() {
    43       Parameters.Add(new LookupParameter<BoolData>("Maximization", "True if the current problem is a maximization problem, otherwise false."));
     44      Parameters.Add(new ValueLookupParameter<BoolData>("Maximization", "True if the current problem is a maximization problem, otherwise false."));
    4445      Parameters.Add(new SubScopesLookupParameter<DoubleData>("Quality", "The quality value contained in each sub-scope which is used for selection."));
    4546    }
Note: See TracChangeset for help on using the changeset viewer.