Ignore:
Timestamp:
07/20/16 14:02:36 (5 years ago)
Author:
gkronber
Message:

#1966: refactoring of bin packing implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSolutionManipulator.cs

    r14046 r14128  
    3232  [Item("PackingSolutionManipulator", "A bin packing manipulation operation.")]
    3333  [StorableClass]
    34   public abstract class PackingSolutionManipulator : SingleSuccessorOperator, IPackingSolutionManipulator, IStochasticOperator {
     34  public abstract class PackingSolutionManipulator<T> : SingleSuccessorOperator, IPackingSolutionManipulator<T>, IStochasticOperator
     35  where T : class, IItem {
    3536
    36     public ILookupParameter<IPackingSolutionEncoding> EncodedSolutionParameter {
    37       get { return (ILookupParameter<IPackingSolutionEncoding>)Parameters["EncodedSolution"]; }
     37    public ILookupParameter<T> EncodedSolutionParameter {
     38      get { return (ILookupParameter<T>)Parameters["EncodedSolution"]; }
    3839    }
    3940
     
    4445    [StorableConstructor]
    4546    protected PackingSolutionManipulator(bool deserializing) : base(deserializing) { }
    46     protected PackingSolutionManipulator(PackingSolutionManipulator original, Cloner cloner) : base(original, cloner) { }
     47    protected PackingSolutionManipulator(PackingSolutionManipulator<T> original, Cloner cloner) : base(original, cloner) { }
    4748    public PackingSolutionManipulator()
    4849      : base() {
    49       Parameters.Add(new LookupParameter<IPackingSolutionEncoding>("EncodedSolution", "The bin packing solution to be manipulated."));
     50      Parameters.Add(new LookupParameter<T>("EncodedSolution", "The bin packing solution to be manipulated."));
    5051      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    5152    }
Note: See TracChangeset for help on using the changeset viewer.