- Timestamp:
- 04/24/12 14:22:32 (13 years ago)
- Location:
- branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/BinaryVectorDiversityCalculator.cs
r7744 r7756 31 31 [Item("BinaryVectorDiversityCalculator", "An operator that performs diversity calculation between bool-valued vectors.")] 32 32 [StorableClass] 33 public sealed class BinaryVectorDiversityCalculator : HeuristicLab.Algorithms.ScatterSearch.DiversityCalculator {33 public sealed class BinaryVectorDiversityCalculator : DiversityCalculator { 34 34 [StorableConstructor] 35 35 private BinaryVectorDiversityCalculator(bool deserializing) : base(deserializing) { } -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/KnapsackImprovementOperator.cs
r7744 r7756 39 39 [StorableClass] 40 40 public sealed class KnapsackImprovementOperator : SingleSuccessorOperator, ILocalImprovementOperator, IScatterSearchTargetProcessor { 41 42 41 #region Problem properties 43 42 public Type ProblemType { -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/NBinaryVectorCrossover.cs
r7744 r7756 64 64 #region Create parameters 65 65 Parameters.Add(new ScopeParameter("CurrentScope")); 66 Parameters.Add(new LookupParameter<IRandom>("Random" , "The pseudo random number generator which should be used for stochastic crossover operators."));67 Parameters.Add(new ScopeTreeLookupParameter<BinaryVector>("Parents" , "The parent vectors which should be crossed."));66 Parameters.Add(new LookupParameter<IRandom>("Random")); 67 Parameters.Add(new ScopeTreeLookupParameter<BinaryVector>("Parents")); 68 68 #endregion 69 69 ParentsParameter.ActualName = "BinaryVector"; -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/NChildCrossover.cs
r7744 r7756 78 78 79 79 protected override ItemArray<BinaryVector> Cross(IRandom random, ItemArray<BinaryVector> parents) { 80 if (parents.Length != 2) throw new ArgumentException(" ERROR in NChildCrossover: The number of parents is not equal to 2");80 if (parents.Length != 2) throw new ArgumentException("NChildCrossover: The number of parents is not equal to 2."); 81 81 82 82 if (NParameter.ActualValue == null) throw new InvalidOperationException("NChildCrossover: Parameter " + NParameter.ActualName + " could not be found.");
Note: See TracChangeset
for help on using the changeset viewer.