Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/03/15 15:17:13 (9 years ago)
Author:
pfleck
Message:

#2495

  • Renamed ClockwiseMigrationDirection ClockwiseMigration.
  • Removed access property.
  • Updated documentation comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Operators/3.3/UnidirectionalRingMigrator.cs

    r13094 r13109  
    3535  [StorableClass]
    3636  public class UnidirectionalRingMigrator : SingleSuccessorOperator, IMigrator {
    37     public IValueLookupParameter<BoolValue> ClockwiseMigrationDirectionParameter {
    38       get { return (IValueLookupParameter<BoolValue>)Parameters["ClockwiseMigrationDirection"]; }
    39     }
    40 
    41     public BoolValue ClockwiseMigrationDirection
    42     {
    43       get { return ClockwiseMigrationDirectionParameter.Value; }
    44       set { ClockwiseMigrationDirectionParameter.Value = value; }
     37    public IValueLookupParameter<BoolValue> ClockwiseMigrationParameter {
     38      get { return (IValueLookupParameter<BoolValue>)Parameters["ClockwiseMigration"]; }
    4539    }
    4640
     
    5145    public UnidirectionalRingMigrator()
    5246      : base() {
    53       Parameters.Add(new ValueLookupParameter<BoolValue>("ClockwiseMigrationDirection", "True to migrate individuals clockwise, otherwise migrate individuals counterclockwise.", new BoolValue(true)));
     47      Parameters.Add(new ValueLookupParameter<BoolValue>("ClockwiseMigration", "True to migrate individuals clockwise, false to migrate individuals counterclockwise.", new BoolValue(true)));
    5448    }
    5549
     
    5852      // BackwardsCompatibility3.3
    5953      #region Backwards compatible code (remove with 3.4)
    60       if (!Parameters.ContainsKey("ClockwiseMigrationDirection")) {
    61         Parameters.Add(new ValueLookupParameter<BoolValue>("ClockwiseMigrationDirection", "True to migrate individuals clockwise, otherwise migrate individuals counterclockwise.", new BoolValue(false)));
     54      if (!Parameters.ContainsKey("ClockwiseMigration")) {
     55        Parameters.Add(new ValueLookupParameter<BoolValue>("ClockwiseMigration", "True to migrate individuals clockwise, false to migrate individuals counterclockwise.", new BoolValue(false)));
    6256      }
    6357      #endregion
     
    6862
    6963    /// <summary>
    70     /// Migrates every first sub scope of each child to its left neighbour (like a ring).
    71     /// <pre>                                                               
     64    /// Migrates every first sub scope of each child to its right or left neighbour (like a ring).
     65    /// If clockwise migration (default) is used the selected scopes A D G becomes G A D, contrary to counterclockwise where A D G becomes D G A.
     66    /// <pre>
    7267    ///          __ scope __              __ scope __
    7368    ///         /     |     \            /     |     \
     
    8176    /// <returns>The next operation.</returns>
    8277    public override IOperation Apply() {
    83       bool clockwise = ClockwiseMigrationDirectionParameter.ActualValue.Value;
     78      bool clockwise = ClockwiseMigrationParameter.ActualValue.Value;
    8479      IScope scope = ExecutionContext.Scope;
    8580      List<IScope> emigrantsList = new List<IScope>();
Note: See TracChangeset for help on using the changeset viewer.