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/ThreeOpt/TranslocationMoveGenerator.cs

    r3231 r3232  
    2828
    2929namespace HeuristicLab.Encodings.PermutationEncoding {
    30   [Item("ThreeOptMoveGenerator", "Base class for move generators that produce 3-opt moves.")]
     30  [Item("TranslocationMoveGenerator", "Base class for move generators that produce translocation moves (3-opt).")]
    3131  [StorableClass]
    32   public abstract class ThreeOptMoveGenerator : SingleSuccessorOperator, IThreeOptPermutationMoveOperator, IMoveGenerator {
     32  public abstract class TranslocationMoveGenerator : SingleSuccessorOperator, IPermutationTranslocationMoveOperator, IMoveGenerator {
    3333    public override bool CanChangeName {
    3434      get { return false; }
     
    3737      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
    3838    }
    39     public ILookupParameter<ThreeOptMove> ThreeOptMoveParameter {
    40       get { return (LookupParameter<ThreeOptMove>)Parameters["ThreeOptMove"]; }
     39    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     40      get { return (LookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
    4141    }
    4242    protected ScopeParameter CurrentScopeParameter {
     
    4444    }
    4545
    46     public ThreeOptMoveGenerator()
     46    public TranslocationMoveGenerator()
    4747      : base() {
    4848      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation for which moves should be generated."));
    49       Parameters.Add(new LookupParameter<ThreeOptMove>("ThreeOptMove", "The moves that should be generated in subscopes."));
     49      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The moves that should be generated in subscopes."));
    5050      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5151    }
     
    5353    public override IOperation Apply() {
    5454      Permutation p = PermutationParameter.ActualValue;
    55       ThreeOptMove[] moves = GenerateMoves(p);
     55      TranslocationMove[] moves = GenerateMoves(p);
    5656      Scope[] moveScopes = new Scope[moves.Length];
    5757      for (int i = 0; i < moveScopes.Length; i++) {
    5858        moveScopes[i] = new Scope(i.ToString());
    59         moveScopes[i].Variables.Add(new Variable(ThreeOptMoveParameter.ActualName, moves[i]));
     59        moveScopes[i].Variables.Add(new Variable(TranslocationMoveParameter.ActualName, moves[i]));
    6060      }
    6161      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
     
    6363    }
    6464
    65     protected abstract ThreeOptMove[] GenerateMoves(Permutation permutation);
     65    protected abstract TranslocationMove[] GenerateMoves(Permutation permutation);
    6666  }
    6767}
Note: See TracChangeset for help on using the changeset viewer.