Free cookie consent management tool by TermsFeed Policy Generator

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

Operator architecture refactoring (#95)

  • worked on operators and SGA
  • improved performance
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs

    r2796 r2830  
    2727namespace HeuristicLab.Operators {
    2828  /// <summary>
    29   /// Operator which contains an operator graph.
     29  /// An operator which contains an operator graph.
    3030  /// </summary>
    3131  [Item("CombinedOperator", "An operator which contains an operator graph.")]
    3232  [Creatable("Test")]
    33   public sealed class CombinedOperator : SingleSuccessorOperator, IOperator {
    34     public override Image ItemImage {
    35       get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Module; }
    36     }
    37     [Storable]
    38     private OperatorGraph operatorGraph;
    39     public OperatorGraph OperatorGraph {
    40       get { return operatorGraph; }
    41     }
     33  public sealed class CombinedOperator : AlgorithmOperator, IOperator {
    4234    public new ParameterCollection Parameters {
    4335      get {
     
    5244    }
    5345
    54     public CombinedOperator()
    55       : base() {
    56       operatorGraph = new OperatorGraph();
    57     }
    58 
    59     public override IDeepCloneable Clone(Cloner cloner) {
    60       CombinedOperator clone = (CombinedOperator)base.Clone(cloner);
    61       clone.operatorGraph = (OperatorGraph)cloner.Clone(operatorGraph);
    62       return clone;
    63     }
    64 
    65     public override IExecutionSequence Apply() {
    66       ExecutionContextCollection next = new ExecutionContextCollection(base.Apply());
    67       if (operatorGraph.InitialOperator != null)
    68         next.Insert(0, ExecutionContext.CreateChildContext(operatorGraph.InitialOperator));
    69       return next;
    70     }
     46    public CombinedOperator() : base() { }
    7147  }
    7248}
Note: See TracChangeset for help on using the changeset viewer.