Changeset 466 for trunk/sources/HeuristicLab.Operators.Metaprogramming
- Timestamp:
- 08/07/08 09:12:59 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators.Metaprogramming
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Metaprogramming/DoubleRangeVariableInjector.cs
r465 r466 35 35 public DoubleRangeVariableInjector() 36 36 : 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)); 38 38 AddVariableInfo(new VariableInfo("VariableName", "Name of the variable that should be injected", typeof(StringData), VariableKind.In)); 39 39 AddVariableInfo(new VariableInfo("Min", "Minimal value of the injected variable", typeof(DoubleData), VariableKind.In)); … … 53 53 Scope subScope = new Scope(variableName + "<-" + value); 54 54 55 OperatorGraph opGraph = new OperatorGraph();55 CombinedOperator combOp = new CombinedOperator(); 56 56 VariableInjector varInjector = new VariableInjector(); 57 57 varInjector.AddVariable(new Variable(variableName, new DoubleData(value))); 58 58 59 opGraph.AddOperator(varInjector);60 opGraph.InitialOperator = varInjector;59 combOp.OperatorGraph.AddOperator(varInjector); 60 combOp.OperatorGraph.InitialOperator = varInjector; 61 61 62 subScope.AddVariable(new Variable(scope.TranslateName("VariableInjector"), opGraph));62 subScope.AddVariable(new Variable(scope.TranslateName("VariableInjector"), combOp)); 63 63 scope.AddSubScope(subScope); 64 64 } -
trunk/sources/HeuristicLab.Operators.Metaprogramming/SequentialComposer.cs
r465 r466 45 45 46 46 foreach(StringData opName in parts) { 47 IOperatorGraph subOpGraph = scope.GetVariableValue<IOperatorGraph>(opName.Data, true);48 foreach(IOperator op in subOp Graph.Operators)47 CombinedOperator subOp = scope.GetVariableValue<CombinedOperator>(opName.Data, true); 48 foreach(IOperator op in subOp.OperatorGraph.Operators) 49 49 combOp.OperatorGraph.AddOperator(op); 50 seq.AddSubOperator(subOp Graph.InitialOperator);50 seq.AddSubOperator(subOp.OperatorGraph.InitialOperator); 51 51 } 52 52 combOp.OperatorGraph.AddOperator(seq);
Note: See TracChangeset
for help on using the changeset viewer.