Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/10 03:01:01 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on algorithms, problems and parameters
Location:
trunk/sources/HeuristicLab.Parameters/3.3
Files:
2 edited
1 moved

Legend:

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

    r2852 r2890  
    6969    <Compile Include="ConstrainedValueParameter.cs" />
    7070    <Compile Include="LookupParameter.cs" />
     71    <Compile Include="OptionalValueParameter.cs" />
    7172    <Compile Include="SubScopesLookupParameter.cs" />
    7273    <Compile Include="ValueLookupParameter.cs" />
    73     <Compile Include="ValueParameter.cs" />
    7474    <Compile Include="ScopeParameter.cs" />
    7575    <Compile Include="HeuristicLabParametersPlugin.cs" />
  • trunk/sources/HeuristicLab.Parameters/3.3/OperatorParameter.cs

    r2818 r2890  
    3030  [EmptyStorableClass]
    3131  [Creatable("Test")]
    32   public class OperatorParameter : ValueParameter<IOperator> {
     32  public class OperatorParameter : OptionalValueParameter<IOperator> {
    3333    public OperatorParameter()
    3434      : base("Anonymous") {
  • trunk/sources/HeuristicLab.Parameters/3.3/OptionalValueParameter.cs

    r2889 r2890  
    2727namespace HeuristicLab.Parameters {
    2828  /// <summary>
    29   /// A parameter whose value is defined it the parameter itself.
     29  /// A parameter whose value is defined it the parameter itself. The value of the parameter can be null, if the parameter is not set.
    3030  /// </summary>
    31   [Item("ValueParameter<T>", "A parameter whose value is defined it the parameter itself.")]
    32   public class ValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem {
     31  [Item("OptionalValueParameter<T>", "A parameter whose value is defined it the parameter itself. The value of the parameter can be null, if the parameter is not set.")]
     32  public class OptionalValueParameter<T> : Parameter, IValueParameter<T> where T : class, IItem {
    3333    private T value;
    3434    [Storable]
     
    5757    }
    5858
    59     public ValueParameter()
     59    public OptionalValueParameter()
    6060      : base("Anonymous", typeof(T)) {
    6161    }
    62     public ValueParameter(string name)
     62    public OptionalValueParameter(string name)
    6363      : base(name, typeof(T)) {
    6464    }
    65     public ValueParameter(string name, T value)
     65    public OptionalValueParameter(string name, T value)
    6666      : base(name, typeof(T)) {
    6767      Value = value;
    6868    }
    69     public ValueParameter(string name, string description)
     69    public OptionalValueParameter(string name, string description)
    7070      : base(name, description, typeof(T)) {
    7171    }
    72     public ValueParameter(string name, string description, T value)
     72    public OptionalValueParameter(string name, string description, T value)
    7373      : base(name, description, typeof(T)) {
    7474      Value = value;
     
    7676
    7777    public override IDeepCloneable Clone(Cloner cloner) {
    78       ValueParameter<T> clone = (ValueParameter<T>)base.Clone(cloner);
     78      OptionalValueParameter<T> clone = (OptionalValueParameter<T>)base.Clone(cloner);
    7979      clone.Value = (T)cloner.Clone(value);
    8080      return clone;
Note: See TracChangeset for help on using the changeset viewer.