Free cookie consent management tool by TermsFeed Policy Generator

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

Operator architecture refactoring (#95)

  • worked on operators, engines, and optimization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs

    r2818 r2834  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.Text;
    2523using HeuristicLab.Core;
    2624using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    5755    protected override void ProcessNextOperator() {
    5856      currentOperator = null;
    59       IExecutionSequence next = ExecutionStack.Pop();
    60       ExecutionContextCollection coll = next as ExecutionContextCollection;
     57      IOperation next = ExecutionStack.Pop();
     58      OperationCollection coll = next as OperationCollection;
    6159      while (coll != null) {
    6260        for (int i = coll.Count - 1; i >= 0; i--)
    6361          ExecutionStack.Push(coll[i]);
    6462        next = ExecutionStack.Count > 0 ? ExecutionStack.Pop() : null;
    65         coll = next as ExecutionContextCollection;
     63        coll = next as OperationCollection;
    6664      }
    67       ExecutionContext context = next as ExecutionContext;
    68       if (context != null) {
     65      IAtomicOperation operation = next as IAtomicOperation;
     66      if (operation != null) {
    6967        try {
    70           currentOperator = context.Operator;
    71           ExecutionStack.Push(context.Operator.Execute(context));
     68          currentOperator = operation.Operator;
     69          ExecutionStack.Push(operation.Operator.Execute((IExecutionContext)operation));
    7270          currentOperator = null;
    7371        }
    7472        catch (Exception ex) {
    75           ExecutionStack.Push(context);
     73          ExecutionStack.Push(operation);
    7674          Stop();
    7775          OnExceptionOccurred(ex);
    7876        }
    79         if (context.Operator.Breakpoint)
     77        if (operation.Operator.Breakpoint)
    8078          Stop();
    8179      }
Note: See TracChangeset for help on using the changeset viewer.