Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 17:37:02 (14 years ago)
Author:
abeham
Message:

#922

  • Refactored HeuristicLab.Encodings.PermutationEncoding
Location:
branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3738  [StorableClass]
    3839  public class CosaCrossover : PermutationCrossover {
     40    [StorableConstructor]
     41    protected CosaCrossover(bool deserializing) : base(deserializing) { }
     42    protected CosaCrossover(CosaCrossover original, Cloner cloner) : base(original, cloner) { }
     43    public CosaCrossover() : base() { }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new CosaCrossover(this, cloner);
     47    }
     48
    3949    /// <summary>
    4050    /// The operator actually performs a 2-opt mutation on the first parent, but it uses the second parent to determine which new edge should be inserted.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3435  [StorableClass]
    3536  public class CyclicCrossover : PermutationCrossover {
     37    [StorableConstructor]
     38    protected CyclicCrossover(bool deserializing) : base(deserializing) { }
     39    protected CyclicCrossover(CyclicCrossover original, Cloner cloner) : base(original, cloner) { }
     40    public CyclicCrossover() : base() { }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new CyclicCrossover(this, cloner);
     44    }
     45
    3646    /// <summary>
    3747    /// Performs the cyclic crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs

    r4068 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3536  [StorableClass]
    3637  public class CyclicCrossover2 : PermutationCrossover {
     38    [StorableConstructor]
     39    protected CyclicCrossover2(bool deserializing) : base(deserializing) { }
     40    protected CyclicCrossover2(CyclicCrossover2 original, Cloner cloner) : base(original, cloner) { }
     41    public CyclicCrossover2() : base() { }
     42
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new CyclicCrossover2(this, cloner);
     45    }
     46
    3747    /// <summary>
    3848    /// Performs a variant of the cyclic crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3738  [StorableClass]
    3839  public class EdgeRecombinationCrossover : PermutationCrossover {
     40    [StorableConstructor]
     41    protected EdgeRecombinationCrossover(bool deserializing) : base(deserializing) { }
     42    protected EdgeRecombinationCrossover(EdgeRecombinationCrossover original, Cloner cloner) : base(original, cloner) { }
     43    public EdgeRecombinationCrossover() : base() { }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new EdgeRecombinationCrossover(this, cloner);
     47    }
     48
    3949    /// <summary>
    4050    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="2"/>
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3738  [StorableClass]
    3839  public class MaximalPreservativeCrossover : PermutationCrossover {
     40    [StorableConstructor]
     41    protected MaximalPreservativeCrossover(bool deserializing) : base(deserializing) { }
     42    protected MaximalPreservativeCrossover(MaximalPreservativeCrossover original, Cloner cloner) : base(original, cloner) { }
     43    public MaximalPreservativeCrossover() : base() { }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new MaximalPreservativeCrossover(this, cloner);
     47    }
     48
    3949    /// <summary>
    4050    /// Performs the maximal preservative crossover on <paramref name="parent1"/> and <paramref name="parent2"/>
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs

    r3674 r4667  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030using HeuristicLab.PluginInfrastructure;
     31using HeuristicLab.Common;
    3132
    3233namespace HeuristicLab.Encodings.PermutationEncoding {
     
    5051
    5152    [StorableConstructor]
    52     private MultiPermutationCrossover(bool deserializing) : base(deserializing) { }
     53    protected MultiPermutationCrossover(bool deserializing) : base(deserializing) { }
     54    protected MultiPermutationCrossover(MultiPermutationCrossover original, Cloner cloner) : base(original, cloner) { }
    5355    public MultiPermutationCrossover()
    5456      : base() {
     
    6264          Operators.Add((IPermutationCrossover)Activator.CreateInstance(type), true);
    6365      }
     66    }
     67
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new MultiPermutationCrossover(this, cloner);
    6470    }
    6571
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3738  [StorableClass]
    3839  public class OrderBasedCrossover : PermutationCrossover {
     40    [StorableConstructor]
     41    protected OrderBasedCrossover(bool deserializing) : base(deserializing) { }
     42    protected OrderBasedCrossover(OrderBasedCrossover original, Cloner cloner) : base(original, cloner) { }
     43    public OrderBasedCrossover() : base() { }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new OrderBasedCrossover(this, cloner);
     47    }
     48
    3949    /// <summary>
    4050    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> by
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3738  [StorableClass]
    3839  public class OrderCrossover : PermutationCrossover {
     40    [StorableConstructor]
     41    protected OrderCrossover(bool deserializing) : base(deserializing) { }
     42    protected OrderCrossover(OrderCrossover original, Cloner cloner) : base(original, cloner) { }
     43    public OrderCrossover() : base() { }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new OrderCrossover(this, cloner);
     47    }
     48
    3949    /// <summary>
    4050    /// Performs the order crossover of two permutations.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs

    r4068 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3637  [StorableClass]
    3738  public class OrderCrossover2 : PermutationCrossover {
     39    [StorableConstructor]
     40    protected OrderCrossover2(bool deserializing) : base(deserializing) { }
     41    protected OrderCrossover2(OrderCrossover2 original, Cloner cloner) : base(original, cloner) { }
     42    public OrderCrossover2() : base() { }
     43
     44    public override IDeepCloneable Clone(Cloner cloner) {
     45      return new OrderCrossover2(this, cloner);
     46    }
     47
    3848    /// <summary>
    3949    /// Performs a slight variation of the order crossover of two permutations.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs

    r4545 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3637  [StorableClass]
    3738  public class PartiallyMatchedCrossover : PermutationCrossover {
     39    [StorableConstructor]
     40    protected PartiallyMatchedCrossover(bool deserializing) : base(deserializing) { }
     41    protected PartiallyMatchedCrossover(PartiallyMatchedCrossover original, Cloner cloner) : base(original, cloner) { }
     42    public PartiallyMatchedCrossover() : base() { }
     43
     44    public override IDeepCloneable Clone(Cloner cloner) {
     45      return new PartiallyMatchedCrossover(this, cloner);
     46    }
     47
    3848    /// <summary>
    3949    /// Performs the partially matched crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
  • branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs

    r4477 r4667  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Common;
    2526
    2627namespace HeuristicLab.Encodings.PermutationEncoding {
     
    3435  [StorableClass]
    3536  public class PositionBasedCrossover : PermutationCrossover {
     37    [StorableConstructor]
     38    protected PositionBasedCrossover(bool deserializing) : base(deserializing) { }
     39    protected PositionBasedCrossover(PositionBasedCrossover original, Cloner cloner) : base(original, cloner) { }
     40    public PositionBasedCrossover() : base() { }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new PositionBasedCrossover(this, cloner);
     44    }
     45
    3646    /// <summary>
    3747    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
Note: See TracChangeset for help on using the changeset viewer.