Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/07/11 10:31:48 (13 years ago)
Author:
mkommend
Message:

#1313: Updated view names to use spaces instead of !camelCasing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/3.3/NoSameMatesSelector.cs

    r5957 r5975  
    11using System;
     2using System.Collections.Generic;
    23using System.Linq;
    3 using System.Collections.Generic;
    44using System.Threading;
    55using HeuristicLab.Common;
     
    5555    [StorableConstructor]
    5656    protected NoSameMatesSelector(bool deserializing) : base(deserializing) { }
    57     protected NoSameMatesSelector(NoSameMatesSelector original, Cloner cloner) : base(original, cloner) {
     57    protected NoSameMatesSelector(NoSameMatesSelector original, Cloner cloner)
     58      : base(original, cloner) {
    5859      RegisterParameterEventHandlers();
    5960    }
     
    6263    }
    6364
    64     public NoSameMatesSelector() : base() {
     65    public NoSameMatesSelector()
     66      : base() {
    6567      #region Create parameters
    6668      Parameters.Add(new ValueParameter<ISingleObjectiveSelector>(SelectorParameterName, "The inner selection operator to select the parents.", new TournamentSelector()));
     
    8587          Parameters.Add(new ValueParameter<ISingleObjectiveSelector>(SelectorParameterName, "The inner selection operator to select the parents.", selector));
    8688        }
    87       }   
     89      }
    8890      // FixedValueParameter for quality difference percentage, max attempts, use range
    8991      if (Parameters.ContainsKey(QualityDifferencePercentageParameterName)) {
     
    153155        ScopeList parents = CurrentScope.SubScopes[1].SubScopes;
    154156
    155         for (int indexParent1 = 0, indexParent2 = 1; 
    156              indexParent1 < parents.Count - 1 && selectedParents < parentsToSelect - 1; 
     157        for (int indexParent1 = 0, indexParent2 = 1;
     158             indexParent1 < parents.Count - 1 && selectedParents < parentsToSelect - 1;
    157159             indexParent1 += 2, indexParent2 += 2) {
    158160          double qualityParent1 = ((DoubleValue)parents[indexParent1].Variables[qualityName].Value).Value;
     
    168170          }
    169171
    170           if (parentsDifferent) { 
     172          if (parentsDifferent) {
    171173            // inner selector already copied scopes, no cloning necessary here
    172174            selected[selectedParents++] = parents[indexParent1];
     
    204206      if (CopySelected.Value != true) {
    205207        CopySelected.Value = true;
    206         throw new ArgumentException(Name + ": CopySelected must always be true.");
    207       }
    208     }
    209     #endregion
    210 
    211     #region Helpers 
     208      }
     209    }
     210    #endregion
     211
     212    #region Helpers
    212213    private void ParameterizeSelector(ISingleObjectiveSelector selector) {
    213214      selector.CopySelected = new BoolValue(true); // must always be true
Note: See TracChangeset for help on using the changeset viewer.