Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/17/10 05:24:03 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • corrected several bugs in order to get SGA working
Location:
trunk/sources/HeuristicLab.Operators/3.3
Files:
1 deleted
5 edited

Legend:

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

    r2805 r2818  
    9494    <Compile Include="ParallelSubScopesProcessor.cs" />
    9595    <Compile Include="Placeholder.cs" />
    96     <Compile Include="SingleCallOperator.cs" />
    9796    <Compile Include="IntCounter.cs" />
    9897    <Compile Include="ScopeCleaner.cs" />
  • trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs

    r2796 r2818  
    2929namespace HeuristicLab.Operators {
    3030  /// <summary>
    31   /// An operator which applies multiple operators sequentially on the current scope.
     31  /// A base class for operators which apply multiple user-defined operators.
    3232  /// </summary>
    33   [Item("MultipleCallsOperator", "An operator which applies multiple operators sequentially on the current scope.")]
    34   [Creatable("Test")]
    35   public class MultipleCallsOperator : SingleSuccessorOperator {
     33  [Item("MultipleCallsOperator", "A base class for operators which apply multiple user-defined operators.")]
     34  public abstract class MultipleCallsOperator : SingleSuccessorOperator {
    3635    protected IValueParameter<IOperator>[] OperatorParameters {
    3736      get {
     
    106105      operators[index] = opParam.Value;
    107106    }
    108 
    109     public override IExecutionSequence Apply() {
    110       ExecutionContextCollection next = new ExecutionContextCollection(base.Apply());
    111       for (int i = Operators.Count - 1; i >= 0; i--)
    112         next.Insert(0, ExecutionContext.CreateContext(Operators[i]));
    113       return next;
    114     }
    115107  }
    116108}
  • trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs

    r2794 r2818  
    5858    public override IExecutionSequence Apply() {
    5959      descending = DescendingParameter.ActualValue.Value;
    60       actualName = LookupParameter<DoubleData>.TranslateName(ValueParameter.Name, ExecutionContext);
     60      actualName = LookupParameter<ItemArray<DoubleData>>.TranslateName(ValueParameter.Name, ExecutionContext);
    6161      CurrentScope.SubScopes.Sort(SortScopes);
    6262      return base.Apply();
     
    6767      IVariable var2;
    6868      x.Variables.TryGetValue(actualName, out var1);
    69       x.Variables.TryGetValue(actualName, out var2);
     69      y.Variables.TryGetValue(actualName, out var2);
    7070      if ((var1 == null) && (var2 == null))
    7171        return 0;
  • trunk/sources/HeuristicLab.Operators/3.3/UniformParallelSubScopesProcessor.cs

    r2796 r2818  
    3131  [Creatable("Test")]
    3232  [EmptyStorableClass]
    33   public sealed class UniformParallelSubScopesProcessor : SingleCallOperator {
     33  public sealed class UniformParallelSubScopesProcessor : SingleSuccessorOperator {
     34    private OperatorParameter OperatorParameter {
     35      get { return (OperatorParameter)Parameters["Operator"]; }
     36    }
     37    public IOperator Operator {
     38      get { return OperatorParameter.Value; }
     39      set { OperatorParameter.Value = value; }
     40    }
     41
    3442    public UniformParallelSubScopesProcessor()
    3543      : base() {
    36       Parameters.Remove("Operator");
    3744      Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied on all sub-scopes of the current scope in parallel."));
    3845    }
  • trunk/sources/HeuristicLab.Operators/3.3/UniformSequentialSubScopesProcessor.cs

    r2796 r2818  
    3131  [Creatable("Test")]
    3232  [EmptyStorableClass]
    33   public sealed class UniformSequentialSubScopesProcessor : SingleCallOperator {
     33  public sealed class UniformSequentialSubScopesProcessor : SingleSuccessorOperator {
     34    private OperatorParameter OperatorParameter {
     35      get { return (OperatorParameter)Parameters["Operator"]; }
     36    }
     37    public IOperator Operator {
     38      get { return OperatorParameter.Value; }
     39      set { OperatorParameter.Value = value; }
     40    }
     41
    3442    public UniformSequentialSubScopesProcessor()
    3543      : base() {
    36       Parameters.Remove("Operator");
    3744      Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied sequentially on all sub-scopes of the current scope."));
    3845    }
Note: See TracChangeset for help on using the changeset viewer.