Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/19/10 06:19:16 (14 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on operators, engines, and optimization
Location:
trunk/sources/HeuristicLab.Optimization
Files:
7 added
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/IProblem.cs

    r2829 r2834  
    2020#endregion
    2121
    22 using HeuristicLab.Collections;
     22using HeuristicLab.Core;
    2323
    24 namespace HeuristicLab.Core {
     24namespace HeuristicLab.Optimization {
    2525  /// <summary>
    2626  /// Interface to represent a problem.
    2727  /// </summary>
    28   public interface IProblem : INamedItem {
    29     IObservableKeyedCollection<string, IValueParameter> Parameters { get; }
    30   }
     28  public interface IProblem : INamedItem, IParameterizedItem { }
    3129}
  • trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs

    r2829 r2834  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626
    27 namespace HeuristicLab.Core {
     27namespace HeuristicLab.Optimization {
    2828  /// <summary>
    2929  /// The base class for all problems.
     
    3535    }
    3636
    37     private ValueParameterCollection parameters;
     37    private ParameterCollection parameters;
    3838    [Storable]
    39     protected ValueParameterCollection Parameters {
     39    protected ParameterCollection Parameters {
    4040      get { return parameters;}
    4141      private set {
     
    4646      }
    4747    }
    48     private ReadOnlyObservableKeyedCollection<string, IValueParameter> readOnlyParameters;
    49     IObservableKeyedCollection<string, IValueParameter> IProblem.Parameters {
     48    private ReadOnlyObservableKeyedCollection<string, IParameter> readOnlyParameters;
     49    IObservableKeyedCollection<string, IParameter> IParameterizedItem.Parameters {
    5050      get {
    5151        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
     
    5656    protected Problem() {
    5757      Name = ItemName;
    58       Parameters = new ValueParameterCollection();
     58      Parameters = new ParameterCollection();
    5959      readOnlyParameters = null;
    6060    }
     
    6262    public override IDeepCloneable Clone(Cloner cloner) {
    6363      Problem clone = (Problem)base.Clone(cloner);
    64       clone.Parameters = (ValueParameterCollection)cloner.Clone(parameters);
     64      clone.Parameters = (ParameterCollection)cloner.Clone(parameters);
    6565      return clone;
    6666    }
Note: See TracChangeset for help on using the changeset viewer.