Changeset 5177 for branches/ParallelEngine/HeuristicLab.Optimization.Operators/3.3/MultiObjective/CrowdedComparisonSorter.cs
- Timestamp:
- 12/26/10 03:51:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ParallelEngine/HeuristicLab.Optimization.Operators/3.3/MultiObjective/CrowdedComparisonSorter.cs
r5143 r5177 56 56 } 57 57 58 public override IOperation Apply( ) {58 public override IOperation Apply(IExecutionContext context) { 59 59 ItemArray<IntValue> ranks = RankParameter.ActualValue; 60 60 ItemArray<DoubleValue> distances = CrowdingDistanceParameter.ActualValue; … … 62 62 int[] indices = Enumerable.Range(0, size).ToArray(); 63 63 64 IScope[] scopes = ExecutionContext.Scope.SubScopes.ToArray();64 IScope[] scopes = context.Scope.SubScopes.ToArray(); 65 65 Array.Sort(indices, scopes, new CustomComparer(ranks, distances)); 66 ExecutionContext.Scope.SubScopes.Clear();67 ExecutionContext.Scope.SubScopes.AddRange(scopes);68 return base.Apply( );66 context.Scope.SubScopes.Clear(); 67 context.Scope.SubScopes.AddRange(scopes); 68 return base.Apply(context); 69 69 } 70 70
Note: See TracChangeset
for help on using the changeset viewer.