Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/07/08 09:12:59 (16 years ago)
Author:
gkronber
Message:

changed meta prog. operators to work with CombinedOperators as input and output values (this should be general policy in all operators of this plugin) (#203)

Location:
trunk/sources/HeuristicLab.Operators.Metaprogramming
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Metaprogramming/DoubleRangeVariableInjector.cs

    r465 r466  
    3535    public DoubleRangeVariableInjector()
    3636      : base() {
    37       AddVariableInfo(new VariableInfo("VariableInjector", "The operator graph that should hold the generated variable injector", typeof(IOperatorGraph), VariableKind.New));
     37      AddVariableInfo(new VariableInfo("VariableInjector", "The combined operator that should hold the generated variable injector", typeof(CombinedOperator), VariableKind.New));
    3838      AddVariableInfo(new VariableInfo("VariableName", "Name of the variable that should be injected", typeof(StringData), VariableKind.In));
    3939      AddVariableInfo(new VariableInfo("Min", "Minimal value of the injected variable", typeof(DoubleData), VariableKind.In));
     
    5353        Scope subScope = new Scope(variableName + "<-" + value);
    5454
    55         OperatorGraph opGraph = new OperatorGraph();
     55        CombinedOperator combOp = new CombinedOperator();
    5656        VariableInjector varInjector = new VariableInjector();
    5757        varInjector.AddVariable(new Variable(variableName, new DoubleData(value)));
    5858
    59         opGraph.AddOperator(varInjector);
    60         opGraph.InitialOperator = varInjector;
     59        combOp.OperatorGraph.AddOperator(varInjector);
     60        combOp.OperatorGraph.InitialOperator = varInjector;
    6161
    62         subScope.AddVariable(new Variable(scope.TranslateName("VariableInjector"), opGraph));
     62        subScope.AddVariable(new Variable(scope.TranslateName("VariableInjector"), combOp));
    6363        scope.AddSubScope(subScope);
    6464      }
  • trunk/sources/HeuristicLab.Operators.Metaprogramming/SequentialComposer.cs

    r465 r466  
    4545
    4646      foreach(StringData opName in parts) {
    47         IOperatorGraph subOpGraph = scope.GetVariableValue<IOperatorGraph>(opName.Data, true);
    48         foreach(IOperator op in subOpGraph.Operators)
     47        CombinedOperator subOp = scope.GetVariableValue<CombinedOperator>(opName.Data, true);
     48        foreach(IOperator op in subOp.OperatorGraph.Operators)
    4949          combOp.OperatorGraph.AddOperator(op);
    50         seq.AddSubOperator(subOpGraph.InitialOperator);
     50        seq.AddSubOperator(subOp.OperatorGraph.InitialOperator);
    5151      }
    5252      combOp.OperatorGraph.AddOperator(seq);
Note: See TracChangeset for help on using the changeset viewer.