Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4564


Ignore:
Timestamp:
10/06/10 21:50:16 (14 years ago)
Author:
mkommend
Message:

Added Problem and SingleObjectiveProblem (ticket #1232).

Location:
trunk/sources/HeuristicLab.Optimization/3.3
Files:
1 edited
2 copied

Legend:

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

    r4065 r4564  
    115115    <Compile Include="Interfaces\IRealVectorDecoder.cs" />
    116116    <Compile Include="Interfaces\IRealVectorEncoder.cs" />
     117    <Compile Include="Problem.cs" />
    117118    <Compile Include="RunCollectionConstraints\RunCollectionComparisonConstraint.cs" />
    118119    <Compile Include="RunCollectionConstraints\RunCollectionConstraintCollection.cs" />
     
    163164    <Compile Include="Interfaces\ITabuMaker.cs" />
    164165    <Compile Include="Result.cs" />
     166    <Compile Include="SingleObjectiveProblem.cs" />
    165167    <Compile Include="UserDefinedAlgorithm.cs" />
    166168    <Compile Include="EngineAlgorithm.cs" />
  • trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs

    r4563 r4564  
    2727using HeuristicLab.Common;
    2828using HeuristicLab.Core;
    29 using HeuristicLab.Optimization;
    3029using HeuristicLab.Parameters;
    3130using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3231
    33 namespace HeuristicLab.Problems.DataAnalysis.Classification {
     32namespace HeuristicLab.Optimization {
    3433  [Item("Problem", "Represents a the base class for a problem.")]
    3534  [StorableClass]
     
    4847    protected Problem()
    4948      : base() {
    50       operators = new ItemCollection<IOperator>();
     49      operators = new OperatorCollection();
    5150      Parameters.Add(new ValueParameter<T>(EvaluatorParameterName, "The operator used to evaluate a solution."));
    5251      Parameters.Add(new ValueParameter<U>(SolutionCreateParameterName, "The operator to create a solution."));
     
    6160    public override IDeepCloneable Clone(Cloner cloner) {
    6261      Problem<T, U> clone = (Problem<T, U>)base.Clone(cloner);
    63       clone.operators = new ItemCollection<IOperator>(operators.Select(x => (IOperator)cloner.Clone(x)));
     62      clone.operators = new OperatorCollection(operators.Select(x => (IOperator)cloner.Clone(x)));
    6463      clone.RegisterEventHandlers();
    6564      return clone;
     
    7675
    7776    #region properties
    78     private ItemCollection<IOperator> operators;
     77    private OperatorCollection operators;
    7978    [Storable(Name = "Operators")]
    8079    private IEnumerable<IOperator> StorableOperators {
    8180      get { return operators; }
    82       set { operators = new ItemCollection<IOperator>(value); }
     81      set { operators = new OperatorCollection(value); }
    8382    }
    84     protected ItemCollection<IOperator> Operators {
     83    protected OperatorCollection Operators {
    8584      get { return this.operators; }
    8685    }
  • trunk/sources/HeuristicLab.Optimization/3.3/SingleObjectiveProblem.cs

    r4559 r4564  
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Data;
    24 using HeuristicLab.Optimization;
    2524using HeuristicLab.Parameters;
    2625using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2726
    28 namespace HeuristicLab.Problems.DataAnalysis.Classification {
     27namespace HeuristicLab.Optimization {
    2928  [Item("Single Objective Problem", "Represents a the base class for a single objective problem.")]
    3029  [StorableClass]
Note: See TracChangeset for help on using the changeset viewer.