- Timestamp:
- 12/26/10 03:51:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParallelEngine/HeuristicLab.Operators/3.3/StochasticBranch.cs
r4722 r5177 71 71 } 72 72 73 public override IOperation Apply( ) {74 OperationCollection next = new OperationCollection(base.Apply( ));73 public override IOperation Apply(IExecutionContext context) { 74 OperationCollection next = new OperationCollection(base.Apply(context)); 75 75 if (RandomParameter.ActualValue.NextDouble() < ProbabilityParameter.ActualValue.Value) { 76 if (FirstBranch != null) next.Insert(0, ExecutionContext.CreateOperation(FirstBranch));76 if (FirstBranch != null) next.Insert(0, context.CreateOperation(FirstBranch)); 77 77 } else { 78 if (SecondBranch != null) next.Insert(0, ExecutionContext.CreateOperation(SecondBranch));78 if (SecondBranch != null) next.Insert(0, context.CreateOperation(SecondBranch)); 79 79 } 80 80 return next;
Note: See TracChangeset
for help on using the changeset viewer.