Changeset 8319 for branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs
- Timestamp:
- 07/24/12 15:04:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs
r8304 r8319 28 28 using HeuristicLab.Operators; 29 29 using HeuristicLab.Optimization; 30 using HeuristicLab.Optimization.Operators;31 30 using HeuristicLab.Parameters; 32 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 38 37 [Item("SolutionPoolUpdateMethod", "An operator that updates the solution pool.")] 39 38 [StorableClass] 40 public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator, IS catterSearchOperator, ISimilarityBasedOperator {39 public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator, ISimilarityBasedOperator { 41 40 #region ISimilarityBasedOperator Members 42 public IS imilarityCalculator SimilarityCalculator { get; set; }41 public ISolutionSimilarityCalculator SimilarityCalculator { get; set; } 43 42 #endregion 44 43 … … 130 129 if (orderedOffspring.Any(hasBetterQuality)) { 131 130 // produce the set union 132 var union = orderedParents.Union(orderedOffspring.Where(hasBetterQuality), new SolutionEqualityComparer<IScope>(SimilarityCalculator.Calculate IndividualSimilarity));131 var union = orderedParents.Union(orderedOffspring.Where(hasBetterQuality), new SolutionEqualityComparer<IScope>(SimilarityCalculator.CalculateSolutionSimilarity)); 133 132 if (union.Count() > orderedParents.Count()) { 134 133 var orderedUnion = Maximization.Value ? union.OrderByDescending(x => x.Variables[QualityParameter.ActualName].Value) : … … 142 141 } 143 142 143 // derive SingleObjectiveSolutionSimilarityCalculator from EqualityComparer 144 // delete this ... 144 145 public class SolutionEqualityComparer<T> : EqualityComparer<T> { 145 146 private readonly Func<T, T, double> similarityCalculator;
Note: See TracChangeset
for help on using the changeset viewer.