Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/15/11 14:54:43 (14 years ago)
Author:
abeham
Message:

#1465

  • updated branch with changes from trunk
  • fixed some bugs
  • introduced secondary x-axis option
Location:
branches/histogram
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/histogram

  • branches/histogram/HeuristicLab.Selection/3.3/NoSameMatesSelector.cs

    r5957 r6011  
    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.