Changeset 2796 for trunk/sources/HeuristicLab.Operators
- Timestamp:
- 02/15/10 05:26:02 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators/3.3
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators/3.3/CombinedOperator.cs
r2794 r2796 66 66 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 67 67 if (operatorGraph.InitialOperator != null) 68 next.Insert(0, new ExecutionContext(ExecutionContext, operatorGraph.InitialOperator, ExecutionContext.Scope));68 next.Insert(0, ExecutionContext.CreateChildContext(operatorGraph.InitialOperator)); 69 69 return next; 70 70 } -
trunk/sources/HeuristicLab.Operators/3.3/ConditionalBranch.cs
r2794 r2796 61 61 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 62 62 if (ConditionParameter.ActualValue.Value) { 63 if (TrueBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, TrueBranch, ExecutionContext.Scope));63 if (TrueBranch != null) next.Insert(0, ExecutionContext.CreateContext(TrueBranch)); 64 64 } else { 65 if (FalseBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, FalseBranch, ExecutionContext.Scope));65 if (FalseBranch != null) next.Insert(0, ExecutionContext.CreateContext(FalseBranch)); 66 66 } 67 67 return next; -
trunk/sources/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
r2794 r2796 108 108 </Compile> 109 109 <Compile Include="HeuristicLabOperatorsPlugin.cs" /> 110 <Compile Include="Operator.cs" />111 110 <Compile Include="Properties\AssemblyInfo.cs" /> 112 111 <Compile Include="SingleSuccessorOperator.cs" /> -
trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs
r2794 r2796 110 110 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 111 111 for (int i = Operators.Count - 1; i >= 0; i--) 112 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, Operators[i], ExecutionContext.Scope));112 next.Insert(0, ExecutionContext.CreateContext(Operators[i])); 113 113 return next; 114 114 } -
trunk/sources/HeuristicLab.Operators/3.3/ParallelSubScopesProcessor.cs
r2794 r2796 39 39 inner.Parallel = true; 40 40 for (int i = 0; (i < ExecutionContext.Scope.SubScopes.Count) && (i < Operators.Count); i++) 41 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operators[i], ExecutionContext.Scope.SubScopes[i]));41 inner.Add(ExecutionContext.CreateContext(Operators[i], ExecutionContext.Scope.SubScopes[i])); 42 42 next.Insert(0, inner); 43 43 } -
trunk/sources/HeuristicLab.Operators/3.3/Placeholder.cs
r2794 r2796 45 45 IOperator op = OperatorParameter.ActualValue; 46 46 if (op != null) 47 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, op, ExecutionContext.Scope));47 next.Insert(0, ExecutionContext.CreateContext(op)); 48 48 return next; 49 49 } -
trunk/sources/HeuristicLab.Operators/3.3/SequentialSubScopesProcessor.cs
r2794 r2796 38 38 ExecutionContextCollection inner = new ExecutionContextCollection(); 39 39 for (int i = 0; (i < ExecutionContext.Scope.SubScopes.Count) && (i < Operators.Count); i++) 40 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operators[i], ExecutionContext.Scope.SubScopes[i]));40 inner.Add(ExecutionContext.CreateContext(Operators[i], ExecutionContext.Scope.SubScopes[i])); 41 41 next.Insert(0, inner); 42 42 } -
trunk/sources/HeuristicLab.Operators/3.3/SingleCallOperator.cs
r2794 r2796 48 48 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 49 49 if (Operator != null) 50 next.Insert(0, new ExecutionContext(ExecutionContext.Parent, Operator, ExecutionContext.Scope));50 next.Insert(0, ExecutionContext.CreateContext(Operator)); 51 51 return next; 52 52 } -
trunk/sources/HeuristicLab.Operators/3.3/SingleSuccessorOperator.cs
r2794 r2796 47 47 public override IExecutionSequence Apply() { 48 48 if (Successor != null) 49 return new ExecutionContext(ExecutionContext.Parent, Successor, ExecutionContext.Scope);49 return ExecutionContext.CreateContext(Successor); 50 50 else 51 51 return null; -
trunk/sources/HeuristicLab.Operators/3.3/StochasticBranch.cs
r2794 r2796 65 65 ExecutionContextCollection next = new ExecutionContextCollection(base.Apply()); 66 66 if (RandomParameter.ActualValue.NextDouble() < ProbabilityParameter.ActualValue.Value) { 67 if (FirstBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, FirstBranch, ExecutionContext.Scope));67 if (FirstBranch != null) next.Insert(0, ExecutionContext.CreateContext(FirstBranch)); 68 68 } else { 69 if (SecondBranch != null) next.Insert(0, new ExecutionContext(ExecutionContext.Parent, SecondBranch, ExecutionContext.Scope));69 if (SecondBranch != null) next.Insert(0, ExecutionContext.CreateContext(SecondBranch)); 70 70 } 71 71 return next; -
trunk/sources/HeuristicLab.Operators/3.3/UniformParallelSubScopesProcessor.cs
r2794 r2796 44 44 inner.Parallel = true; 45 45 for (int i = 0; i < ExecutionContext.Scope.SubScopes.Count; i++) 46 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operator, ExecutionContext.Scope.SubScopes[i]));46 inner.Add(ExecutionContext.CreateContext(Operator, ExecutionContext.Scope.SubScopes[i])); 47 47 next.Insert(0, inner); 48 48 } -
trunk/sources/HeuristicLab.Operators/3.3/UniformSequentialSubScopesProcessor.cs
r2794 r2796 43 43 ExecutionContextCollection inner = new ExecutionContextCollection(); 44 44 for (int i = 0; i < ExecutionContext.Scope.SubScopes.Count; i++) 45 inner.Add( new ExecutionContext(ExecutionContext.Parent,Operator, ExecutionContext.Scope.SubScopes[i]));45 inner.Add(ExecutionContext.CreateContext(Operator, ExecutionContext.Scope.SubScopes[i])); 46 46 next.Insert(0, inner); 47 47 }
Note: See TracChangeset
for help on using the changeset viewer.