Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/29/10 18:49:55 (14 years ago)
Author:
abeham
Message:

Renamed operators according to the underlying operation #889

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs

    r3229 r3232  
    2626
    2727namespace HeuristicLab.Encodings.PermutationEncoding {
    28   [Item("ExhaustiveTwoOptMoveGenerator", "Generates all possible 2-opt moves (inversion) from a given permutation.")]
     28  [Item("ExhaustiveInversionMoveGenerator", "Generates all possible inversion moves (2-opt) from a given permutation.")]
    2929  [StorableClass]
    30   public class ExhaustiveTwoOptMoveGenerator : TwoOptMoveGenerator, IExhaustiveMoveGenerator {
    31     public static TwoOptMove[] Apply(Permutation permutation) {
     30  public class ExhaustiveInversionMoveGenerator : InversionMoveGenerator, IExhaustiveMoveGenerator {
     31    public static InversionMove[] Apply(Permutation permutation) {
    3232      int length = permutation.Length;
    3333      int totalMoves = (length) * (length - 1) / 2; // - 3;
    34       TwoOptMove[] moves = new TwoOptMove[totalMoves];
     34      InversionMove[] moves = new InversionMove[totalMoves];
    3535      int count = 0;
    3636      for (int i = 0; i < length - 1; i++)
     
    3939          /*if (i == 0 && j >= length - 2) continue;
    4040          else if (i == 1 && j >= length - 1) continue;*/
    41           moves[count++] = new TwoOptMove(i, j);
     41          moves[count++] = new InversionMove(i, j);
    4242        }
    4343      return moves;
    4444    }
    4545
    46     protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
     46    protected override InversionMove[] GenerateMoves(Permutation permutation) {
    4747      return Apply(permutation);
    4848    }
Note: See TracChangeset for help on using the changeset viewer.