Changeset 2818 for trunk/sources/HeuristicLab.Operators
- Timestamp:
- 02/17/10 05:24:03 (15 years ago)
- 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 94 94 <Compile Include="ParallelSubScopesProcessor.cs" /> 95 95 <Compile Include="Placeholder.cs" /> 96 <Compile Include="SingleCallOperator.cs" />97 96 <Compile Include="IntCounter.cs" /> 98 97 <Compile Include="ScopeCleaner.cs" /> -
trunk/sources/HeuristicLab.Operators/3.3/MultipleCallsOperator.cs
r2796 r2818 29 29 namespace HeuristicLab.Operators { 30 30 /// <summary> 31 /// A n operator which applies multiple operators sequentially on the current scope.31 /// A base class for operators which apply multiple user-defined operators. 32 32 /// </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 { 36 35 protected IValueParameter<IOperator>[] OperatorParameters { 37 36 get { … … 106 105 operators[index] = opParam.Value; 107 106 } 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 }115 107 } 116 108 } -
trunk/sources/HeuristicLab.Operators/3.3/SubScopesSorter.cs
r2794 r2818 58 58 public override IExecutionSequence Apply() { 59 59 descending = DescendingParameter.ActualValue.Value; 60 actualName = LookupParameter< DoubleData>.TranslateName(ValueParameter.Name, ExecutionContext);60 actualName = LookupParameter<ItemArray<DoubleData>>.TranslateName(ValueParameter.Name, ExecutionContext); 61 61 CurrentScope.SubScopes.Sort(SortScopes); 62 62 return base.Apply(); … … 67 67 IVariable var2; 68 68 x.Variables.TryGetValue(actualName, out var1); 69 x.Variables.TryGetValue(actualName, out var2);69 y.Variables.TryGetValue(actualName, out var2); 70 70 if ((var1 == null) && (var2 == null)) 71 71 return 0; -
trunk/sources/HeuristicLab.Operators/3.3/UniformParallelSubScopesProcessor.cs
r2796 r2818 31 31 [Creatable("Test")] 32 32 [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 34 42 public UniformParallelSubScopesProcessor() 35 43 : base() { 36 Parameters.Remove("Operator");37 44 Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied on all sub-scopes of the current scope in parallel.")); 38 45 } -
trunk/sources/HeuristicLab.Operators/3.3/UniformSequentialSubScopesProcessor.cs
r2796 r2818 31 31 [Creatable("Test")] 32 32 [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 34 42 public UniformSequentialSubScopesProcessor() 35 43 : base() { 36 Parameters.Remove("Operator");37 44 Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied sequentially on all sub-scopes of the current scope.")); 38 45 }
Note: See TracChangeset
for help on using the changeset viewer.